This commit is contained in:
parent
b6f12b7acf
commit
8f8ad3035a
33 changed files with 166 additions and 111 deletions
|
@ -2,15 +2,17 @@ package models
|
|||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
// An emote is effectively an assignment of a name and server
|
||||
// Emotes are combinations of a name, the server it originated from
|
||||
// and the media for it
|
||||
//
|
||||
// TODO: Include the case of unicode icons being used as emote
|
||||
type Emote struct {
|
||||
gorm.Model
|
||||
// Media used for this emote
|
||||
Metadata MediaMetadata // `gorm:"foreignKey:MetadataId"`
|
||||
MetadataId string
|
||||
gorm.Model // Standard gorm model for id and timestamps
|
||||
Metadata MediaMetadata // The media used by this emote
|
||||
MetadataId string // Id of the media information, primarily for gorm
|
||||
// Name of the emote. Also the text for using it in a message (ex. :bob:)
|
||||
Name string
|
||||
// Server the emote is from
|
||||
Server RemoteServer // `gorm:"foreignKey:ServerId;references:ID"`
|
||||
ServerId uint
|
||||
|
||||
Server RemoteServer // Server the emote is from
|
||||
ServerId uint // Id of the server
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue