面包店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

goods.go 1.3 KiB

9 months ago
9 months ago
9 months ago
1234567891011121314151617
  1. package model
  2. type Goods struct {
  3. GoodsId int64 `json:"goods_id" xorm:"not null pk comment('商品id') unique BIGINT(20)"`
  4. Title string `json:"title" xorm:"not null default '' comment('商品标题') VARCHAR(1024)"`
  5. CategoryId int `json:"category_id" xorm:"not null default 0 comment('类目ID') INT(11)"`
  6. ImageList string `json:"image_list" xorm:"comment('商品图json') TEXT"`
  7. SaleState int `json:"sale_state" xorm:"not null default 0 comment('销售状态 1销售中 2下架') TINYINT(1)"`
  8. Spe string `json:"spe" xorm:"not null default '' comment('所有规格属性json') VARCHAR(5012)"`
  9. Detail string `json:"detail" xorm:"comment('商品详情') TEXT"`
  10. Price string `json:"price" xorm:"comment('起底价') DECIMAL(10,2)"`
  11. Sort int `json:"sort" xorm:"not null default 0 comment('排序') INT(11)"`
  12. Sales int `json:"sales" xorm:"not null default 0 comment('销量') INT(11)"`
  13. CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"`
  14. UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"`
  15. DeleteAt string `json:"delete_at" xorm:"comment('商品删除字段,不为null时,表示删除') DATETIME"`
  16. }