node_banner.go 903 B

12345678910111213141516171819202122
  1. package app
  2. // 引入关联包
  3. type NodeBanner struct {
  4. Id int64 `json:"id" gorm:"column:id;type:bigint;comment:id;primarykey;NOT NULL"`
  5. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;comment:创建时间"`
  6. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;comment:更新时间"`
  7. Name string `json:"name" gorm:"column:name;type:varchar(256);comment: banner名称"`
  8. Url string `json:"url" gorm:"column:url;type:text;comment:bannerURL"`
  9. IsDisplay int8 `json:"isDisplay" gorm:"column:is_display;type:tinyint;comment:是否有效 1:开放展示 0:不开放展示"`
  10. Sort int64 `json:"sort" gorm:"column:sort;type:bigint;comment:排序"`
  11. Remark string `json:"remark" gorm:"column:remark;type:varchar(200);comment:备注信息"`
  12. }
  13. func (*NodeBanner) TableName() string {
  14. return "node_banner"
  15. }
  16. func NewNodeBanner() *NodeBanner {
  17. return &NodeBanner{}
  18. }