31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package entity
|
||
|
||
import (
|
||
"assets/consts/public"
|
||
|
||
"gitea.com/red-future/common/beans"
|
||
"github.com/gogf/gf/v2/os/gtime"
|
||
"go.mongodb.org/mongo-driver/v2/bson"
|
||
)
|
||
|
||
// SyncTask 同步任务实体
|
||
type SyncTask struct {
|
||
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||
|
||
Platform public.SyncPlatform `json:"platform" bson:"platform"`
|
||
SyncType public.SyncType `json:"syncType" bson:"syncType"`
|
||
Status public.SyncStatus `json:"status" bson:"status"`
|
||
AssetID *bson.ObjectID `json:"assetId" bson:"assetId"`
|
||
AssetSKUID *bson.ObjectID `json:"assetSkuId" bson:"assetSkuId"`
|
||
StockID *bson.ObjectID `json:"stockId" bson:"stockId"`
|
||
ErrorMessage string `json:"errorMessage" bson:"errorMessage"`
|
||
ErrorCount int `json:"errorCount" bson:"errorCount"`
|
||
StartedAt *gtime.Time `json:"startedAt" bson:"startedAt"`
|
||
FinishedAt *gtime.Time `json:"finishedAt" bson:"finishedAt"`
|
||
}
|
||
|
||
// CollectionName 获取集合名称
|
||
func (SyncTask) CollectionName() string {
|
||
return "sync_task"
|
||
}
|