Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
SharedDB - Shared gorm connection instance
Functions ¶
Types ¶
type Media ¶
type Media struct { PublicModel Type MediaType // Image or video source URL RawSrc *string `gorm:"type:text"` UUID uuid.UUID `gorm:"type:char(36);unique_index;not null"` FileType string Height uint Width uint Posts []Post `gorm:"many2many:post_media_map"` }
Media - the model of image/video
type Post ¶
type Post struct { PublicModel UUID uuid.UUID `gorm:"type:char(36);unique_index;not null"` TopicID uint `json:"-"` Topic Topic `json:"-"` ParentID *uint `json:"-"` Parent *Post Message *string `gorm:"type:mediumtext"` Medias []Media `gorm:"many2many:post_media_map"` Replies []Post `gorm:"foreignkey:parent_id"` }
Post under the topic
Click to show internal directories.
Click to hide internal directories.