1234567891011121314151617181920212223242526272829303132 |
- package entity
- import (
- "time"
- )
- const TableNameUserPoster = "user_poster"
- type UserPoster struct {
- PosterID int64 `gorm:"column:poster_id;type:int;primaryKey;autoIncrement:true" json:"poster_id"`
- PosterName string `gorm:"column:poster_name;type:varchar(50);not null" json:"poster_name"`
- UUID string `gorm:"column:uuid;type:char(20);not null" json:"uuid"`
- UID int64 `gorm:"column:uid;type:int;not null" json:"uid"`
- PosterKeywords *string `gorm:"column:poster_keywords;type:varchar(255)" json:"poster_keywords"`
- PosterJSON *string `gorm:"column:poster_json;type:text" json:"poster_json"`
- Preview *string `gorm:"column:preview;type:varchar(255)" json:"preview"`
- Visits int64 `gorm:"column:visits;type:int;not null" json:"visits"`
- Status int64 `gorm:"column:status;type:tinyint;not null;default:1" json:"status"`
- CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"`
- UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"`
- }
- func (*UserPoster) TableName() string {
- return TableNameUserPoster
- }
|