Files
assets/model/entity/sync/sync_task.go
2026-03-18 10:18:03 +08:00

31 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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"
}