user_poster.go 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package entity
  5. import (
  6. "time"
  7. )
  8. const TableNameUserPoster = "user_poster"
  9. // UserPoster mapped from table <user_poster>
  10. type UserPoster struct {
  11. PosterID int64 `gorm:"column:poster_id;type:int;primaryKey;autoIncrement:true" json:"poster_id"` // 海报ID
  12. PosterName string `gorm:"column:poster_name;type:varchar(50);not null" json:"poster_name"` // 海报名称
  13. UUID string `gorm:"column:uuid;type:char(20);not null" json:"uuid"` // 海报唯一标识
  14. UID int64 `gorm:"column:uid;type:int;not null" json:"uid"` // 用户ID
  15. PosterKeywords *string `gorm:"column:poster_keywords;type:varchar(255)" json:"poster_keywords"` // 海报关键字
  16. PosterJSON *string `gorm:"column:poster_json;type:text" json:"poster_json"` // 海报数据
  17. Preview *string `gorm:"column:preview;type:varchar(255)" json:"preview"` // 海报预览地址
  18. Visits int64 `gorm:"column:visits;type:int;not null" json:"visits"` // 访问次数
  19. Status int64 `gorm:"column:status;type:tinyint;not null;default:1" json:"status"`
  20. CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"` // 创建时间
  21. UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"` // 更新时间
  22. }
  23. // TableName UserPoster's table name
  24. func (*UserPoster) TableName() string {
  25. return TableNameUserPoster
  26. }