Prep for reactions, some fixes and improvements
Some checks failed
/ docker (push) Failing after 1m35s
Some checks failed
/ docker (push) Failing after 1m35s
This commit is contained in:
parent
4b62c32247
commit
8947d97825
13 changed files with 262 additions and 43 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue