2025-12-06 10:38:48 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2025-12-18 17:51:33 +08:00
|
|
|
|
"gitee.com/red-future---jilin-g/common/do"
|
2025-12-06 10:38:48 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
2025-12-18 17:51:33 +08:00
|
|
|
|
const StrategyCollection = "strategy"
|
|
|
|
|
|
|
2025-12-06 10:38:48 +08:00
|
|
|
|
// Strategy 匹配策略表
|
|
|
|
|
|
type Strategy struct {
|
2025-12-18 17:51:33 +08:00
|
|
|
|
do.MongoBaseDO `bson:",inline" json:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
|
|
|
|
|
|
|
|
|
|
|
// 策略基本信息
|
|
|
|
|
|
Name string `bson:"name" json:"name"` // 策略名称
|
|
|
|
|
|
Description string `bson:"description" json:"description"` // 描述
|
|
|
|
|
|
MinConversion float64 `bson:"minConversion" json:"minConversion"` // 最低转化率
|
|
|
|
|
|
MaxConversion float64 `bson:"maxConversion" json:"maxConversion"` // 最高转化率
|
|
|
|
|
|
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
|
2025-12-06 10:38:48 +08:00
|
|
|
|
}
|