package models // Car 小车表 type Car struct { ID int64 `json:"id" gorm:"primarykey;comment:小车ID"` WarehouseID int64 `json:"warehouse_id" gorm:"not null;default:0;index;comment:所属仓库ID"` PushType int8 `json:"push_type" gorm:"type:tinyint(1);not null;default:1;comment:推送类型(1:创建波次后随即上架,2:入库后在上架)"` ReleaseType int8 `json:"release_type" gorm:"type:tinyint(1);not null;default:1;comment:发布类型(1:独立库存,2:合并库存)"` Code int64 `json:"code" gorm:"not null;default:0;comment:小车编号"` Name string `json:"name" gorm:"size:50;not null;default:'';comment:小车名称"` Capacity int64 `json:"capacity" gorm:"not null;default:0;comment:容量"` Appearance int64 `json:"appearance" gorm:"type:bigint(20) unsigned;not null;default:0;comment:品相"` 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 (Car) TableName() string { return "car" } func (Car) TableOptions() string { return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小车表'" }