Files
assets/model/entity/sync/sync_task.go

31 lines
1.1 KiB
Go
Raw Normal View History

2026-03-18 10:18:03 +08:00
package entity
import (
"assets/consts/public"
2026-06-10 15:40:17 +08:00
"gitea.redpowerfuture.com/red-future/common/beans"
2026-03-18 10:18:03 +08:00
"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"
}