Dockerfile
This commit is contained in:
45
model/entity/sync/channel_sync_record.go
Normal file
45
model/entity/sync/channel_sync_record.go
Normal file
@@ -0,0 +1,45 @@
|
||||
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"
|
||||
)
|
||||
|
||||
// ChannelSyncRecord 渠道同步记录
|
||||
type ChannelSyncRecord struct {
|
||||
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段
|
||||
|
||||
// 关联关系
|
||||
AssetID *bson.ObjectID `bson:"assetId" json:"assetId"` // 关联资产ID
|
||||
SkuID *bson.ObjectID `bson:"skuId" json:"skuId"` // 关联SKU ID
|
||||
Channel public.SyncPlatform `bson:"channel" json:"channel"` // 渠道类型
|
||||
|
||||
// 同步状态信息
|
||||
Status public.SyncStatus `bson:"status" json:"status"` // 同步状态
|
||||
|
||||
// 渠道商品信息
|
||||
ChannelProductID *bson.ObjectID `bson:"channelProductId" json:"channelProductId"` // 渠道商品ID
|
||||
ChannelSkuID *bson.ObjectID `bson:"channelSkuId" json:"channelSkuId"` // 渠道SKU ID
|
||||
ChannelURL string `bson:"channelUrl" json:"channelUrl"` // 渠道商品链接
|
||||
|
||||
// 同步信息
|
||||
LastSyncTime *gtime.Time `bson:"lastSyncTime" json:"lastSyncTime"` // 最后同步时间
|
||||
LastSyncResult *SyncResult `bson:"lastSyncResult" json:"lastSyncResult"` // 最后同步结果
|
||||
ErrorCount int `bson:"errorCount" json:"errorCount"` // 错误次数
|
||||
}
|
||||
|
||||
// CollectionName 渠道同步记录集合名称
|
||||
func (ChannelSyncRecord) CollectionName() string {
|
||||
return "channel_sync_record"
|
||||
}
|
||||
|
||||
// SyncResult 同步结果
|
||||
type SyncResult struct {
|
||||
Success bool `bson:"success" json:"success"` // 是否成功
|
||||
ErrorMsg string `bson:"errorMsg" json:"errorMsg"` // 错误信息
|
||||
SyncTime *gtime.Time `bson:"syncTime" json:"syncTime"` // 同步时间
|
||||
Data map[string]interface{} `bson:"data" json:"data"` // 同步数据
|
||||
}
|
||||
Reference in New Issue
Block a user