product.go 1.4 KB

12345678910111213141516171819202122
  1. package gorm_model
  2. import (
  3. "time"
  4. )
  5. type YounggeeProduct struct {
  6. ProductId int `gorm:"column:product_id;type:int(11);primary_key" json:"product_id"` // 商品id
  7. ProductName string `gorm:"column:product_name;type:varchar(50)" json:"product_name"` // 商品名称
  8. ProductType int `gorm:"column:product_type;type:tinyint(4)" json:"product_type"` // 商品类型
  9. ShopAddress string `gorm:"column:shop_address;type:varchar(255)" json:"shop_address"` // 店铺地址,商品类型为线下品牌时需填写
  10. ProductPrice int64 `gorm:"column:product_price;type:bigint(20)" json:"product_price"` // 商品价值
  11. ProductUrl string `gorm:"column:product_url;type:varchar(1000)" json:"product_url"` // 商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;
  12. EnterpriseId int `gorm:"column:enterprise_id;type:int(11)" json:"enterprise_id"` // 所属企业id
  13. CreatedAt time.Time `gorm:"column:created_at;type:datetime;" json:"created_at"` // 创建时间
  14. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime" json:"updated_at"` // 更新时间
  15. BrandName string `gorm:"column:brand_name;type:varchar(50)" json:"brand_name"`
  16. }
  17. func (m *YounggeeProduct) TableName() string {
  18. return "younggee_product"
  19. }