25 lines
1.2 KiB
Go
25 lines
1.2 KiB
Go
package models
|
|
|
|
// CarShop 小车店铺关联表
|
|
type CarShop struct {
|
|
ID int64 `json:"id" gorm:"primarykey;comment:关联ID"`
|
|
CarID int64 `json:"car_id" gorm:"not null;default:0;comment:小车id"`
|
|
ShopID int64 `json:"shop_id" gorm:"not null;default:0;comment:店铺id"`
|
|
ShopName string `json:"shop_name" gorm:"size:50;not null;default:'';comment:店铺名称"`
|
|
ShopType int8 `json:"shop_type" gorm:"type:tinyint(1);not null;default:0;comment:店铺类型"`
|
|
ClientID string `json:"client_id" gorm:"size:50;not null;comment:客户端id"`
|
|
AppKey string `json:"app_key" gorm:"size:255;not null;default:'';comment:app_key"`
|
|
AppSecret string `json:"app_secret" gorm:"size:255;not null;default:'';comment:app_secret"`
|
|
CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:创建时间戳(秒)"`
|
|
UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;not null;default:0;comment:更新时间戳(秒)"`
|
|
IsDel int8 `json:"is_del" gorm:"type:tinyint(1);not null;default:0;comment:逻辑删除标记(0:未删除,1:已删除)"`
|
|
}
|
|
|
|
func (CarShop) TableName() string {
|
|
return "car_shop"
|
|
}
|
|
|
|
func (CarShop) TableOptions() string {
|
|
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小车店铺关联表'"
|
|
}
|