Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
Types ¶
type BaseModel ¶
type BaseModel struct { ID int64 `gorm:"primarykey"` CreatedAt time.Time `gorm:"column:add_time"` UpdatedAt time.Time `gorm:"column:update_time; index"` DeletedAt gorm.DeletedAt IsDeleted bool }
BaseModel model ID and other info
type Video ¶
type Video struct { BaseModel AuthorID int64 `gorm:"index:idx_authorid;not null"` // index, use user id to get video list PlayUrl string `gorm:"type:varchar(200);not null"` CoverUrl string `gorm:"type:varchar(200);not null"` FavCount int64 `gorm:"type:int;default:0;not null"` ComCount int64 `gorm:"type:int;default:0;not null"` IsFavorite bool `gorm:"type:bool;default:false;not null"` Data []byte `gorm:"column:video_data"` Title string `gorm:"type:varchar(50);not null"` }
Video model video info
Click to show internal directories.
Click to hide internal directories.