23 lines
1.1 KiB
Go
23 lines
1.1 KiB
Go
package models
|
|
|
|
// UserMapping UserMapping
|
|
type UserMapping struct {
|
|
ID int64 `json:"id" gorm:"primarykey;comment:映射ID"`
|
|
AboutID int64 `json:"about_id" gorm:"not null;default:0;index;comment:关联ID"`
|
|
Username string `json:"username" gorm:"size:50;not null;default:'';comment:登录账号"`
|
|
WarehouseId int64 `json:"warehouse_id" gorm:"not null;default:0;comment:仓库ID"`
|
|
WarehouseCode string `json:"warehouse_code" gorm:"size:50;not null;default:'';comment:仓库编码"`
|
|
WarehouseName string `json:"warehouse_name" gorm:"size:100;not null;default:'';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 (UserMapping) TableName() string {
|
|
return "user_mapping"
|
|
}
|
|
|
|
func (UserMapping) TableOptions() string {
|
|
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户映射表'"
|
|
}
|