24 lines
1.3 KiB
Go
24 lines
1.3 KiB
Go
package models
|
||
|
||
// Shop 店铺主表
|
||
type Shop struct {
|
||
ID int64 `json:"id" gorm:"primarykey;comment:店铺ID"`
|
||
MallID int64 `json:"mall_id" gorm:"not null;default:0;comment:三方店铺id"`
|
||
ShopType int8 `json:"shop_type" gorm:"type:tinyint(1);not null;default:1;comment:店铺类型 1 拼多多 2 孔夫子 5 闲鱼"`
|
||
ShopAliasName string `json:"shop_alias_name" gorm:"size:255;not null;default:'';comment:店铺名称(对应平台的店铺名称)"`
|
||
CreateBy int64 `json:"create_by" gorm:"not null;default:0;comment:创建者"`
|
||
CreateTime int64 `json:"create_time" gorm:"type:bigint;not null;default:0;comment:创建时间"`
|
||
UpdateBy int64 `json:"update_by" gorm:"not null;default:0;comment:更新者"`
|
||
UpdateTime int64 `json:"update_time" gorm:"type:bigint;not null;default:0;comment:更新时间"`
|
||
Status int8 `json:"status" gorm:"type:tinyint(1);not null;default:0;comment:店铺状态(0正常 1停用)"`
|
||
DelFlag int8 `json:"del_flag" gorm:"type:tinyint(1);not null;default:0;comment:删除标志(0代表存在 1代表删除)"`
|
||
}
|
||
|
||
func (Shop) TableName() string {
|
||
return "shop"
|
||
}
|
||
|
||
func (Shop) TableOptions() string {
|
||
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='店铺主表'"
|
||
}
|