gomod引用
This commit is contained in:
@@ -8,7 +8,8 @@ const StrategyCollection = "strategy"
|
||||
|
||||
// Strategy 匹配策略表
|
||||
type Strategy struct {
|
||||
do.MongoBaseDO `bson:",inline" json:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
do.MongoBaseDO `bson:",inline" json:",inline"`
|
||||
Status string `bson:"status" json:"status"` // 状态:active、inactive、maintenance等
|
||||
|
||||
// 策略基本信息
|
||||
Name string `bson:"name" json:"name"` // 策略名称
|
||||
@@ -18,6 +19,10 @@ type Strategy struct {
|
||||
SourceWeights string `bson:"sourceWeights" json:"sourceWeights"` // 广告源权重 (JSON格式)
|
||||
MaxAdsPerReq int `bson:"maxAdsPerReq" json:"maxAdsPerReq"` // 每次请求最大广告数
|
||||
MaxReqPerHour int `bson:"maxReqPerHour" json:"maxReqPerHour"` // 每小时最大请求次数
|
||||
Priority int `bson:"priority" json:"priority"` // 优先级
|
||||
Status string `bson:"status" json:"status"` // 状态: active, inactive
|
||||
Priority int `bson:"priority" json:"priority"` // 优先级(用于策略排序)
|
||||
}
|
||||
|
||||
// GetCollectionName 获取集合名称
|
||||
func (s *Strategy) GetCollectionName() string {
|
||||
return StrategyCollection
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user