32 lines
1.9 KiB
Go
32 lines
1.9 KiB
Go
package models
|
|
|
|
import "gorm.io/datatypes"
|
|
|
|
// OutTaskLog 外部任务日志表
|
|
type OutTaskLog struct {
|
|
ID int64 `json:"id" gorm:"primarykey;comment:主键ID"`
|
|
ShopID int64 `json:"shop_id" gorm:"not null;default:0;index;comment:店铺ID"`
|
|
WaveTaskID int64 `json:"wave_task_id" gorm:"not null;default:0;index;comment:波次任务ID"`
|
|
OutTaskID int64 `json:"out_task_id" gorm:"not null;default:0;index;comment:外部任务ID"`
|
|
ProductID int64 `json:"product_id" gorm:"not null;default:0;index;comment:产品ID"`
|
|
ISBN string `json:"isbn" gorm:"type:varchar(100);not null;default:'';comment:isbn"`
|
|
LiveImage datatypes.JSON `json:"live_image" gorm:"type:json;not null;comment:实拍图json"`
|
|
Stock int64 `json:"stock" gorm:"not null;default:0;comment:库存"`
|
|
SalePrice int64 `json:"sale_price" gorm:"not null;default:0;comment:售价"`
|
|
Cost int64 `json:"cost" gorm:"not null;default:0;comment:运费"`
|
|
SkuCode string `json:"sku_code" gorm:"type:varchar(100);not null;default:'';comment:货号"`
|
|
Status int8 `json:"status" gorm:"type:tinyint(1);not null;comment:状态 0异常 1推送成功 2发布成功"`
|
|
Msg string `json:"msg" gorm:"type:varchar(255);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 (OutTaskLog) TableName() string {
|
|
return "out_task_log"
|
|
}
|
|
|
|
func (OutTaskLog) TableOptions() string {
|
|
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='外部任务日志表'"
|
|
}
|