Prep for reactions, some fixes and improvements
Some checks failed
/ docker (push) Failing after 1m35s

This commit is contained in:
Melody Becker 2025-06-16 08:13:11 +02:00
parent 4b62c32247
commit 8947d97825
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
13 changed files with 262 additions and 43 deletions

View file

@ -2,6 +2,7 @@ package models
import (
"database/sql"
"time"
"gorm.io/gorm"
)
@ -10,12 +11,15 @@ import (
// A reaction may contain some content text. If yes, this is the reaction.
// It also may contain a specifically linked emote (via tag). If yes, this is the reaction and takes precedence over the content
type Reaction struct {
gorm.Model
ID string `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
Note Note
NoteId string
Reactor User
ReactorId string
Emote *Emote // Emote is optional. If not set, use the default emote of the server
EmoteId sql.NullInt64
EmoteId sql.NullString
Content sql.NullString // Content/text of the reaction. Used for example in cases where a unicode character is sent as emote reaction
}