2025-12-19 09:42:39 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2026-02-24 16:24:47 +08:00
|
|
|
|
"gitea.com/red-future/common/beans"
|
2025-12-19 09:42:39 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const AppPlatformConfigCollection = "app_platform_config"
|
|
|
|
|
|
|
|
|
|
|
|
// AppPlatformConfig 应用平台配置实体
|
|
|
|
|
|
type AppPlatformConfig struct {
|
2025-12-31 11:04:55 +08:00
|
|
|
|
beans.MongoBaseDO `bson:",inline" json:",inline"`
|
|
|
|
|
|
Status string `bson:"status" json:"status"` // 状态:active、inactive、maintenance等
|
2025-12-19 09:42:39 +08:00
|
|
|
|
|
|
|
|
|
|
// 关联信息
|
|
|
|
|
|
AppID string `bson:"appId" json:"appId"` // 应用ID
|
|
|
|
|
|
PlatformID string `bson:"platformId" json:"platformId"` // 平台ID
|
|
|
|
|
|
|
|
|
|
|
|
// 配置信息
|
|
|
|
|
|
Config string `bson:"config" json:"config"` // 配置信息(JSON字符串)
|
|
|
|
|
|
MaxAdsPerReq int `bson:"maxAdsPerReq" json:"maxAdsPerReq"` // 每次请求最大广告数
|
|
|
|
|
|
|
|
|
|
|
|
// 定向配置
|
|
|
|
|
|
TargetingRules string `bson:"targetingRules" json:"targetingRules"` // 定向规则(JSON字符串)
|
|
|
|
|
|
|
|
|
|
|
|
// 过滤配置
|
|
|
|
|
|
FilterRules string `bson:"filterRules" json:"filterRules"` // 过滤规则(JSON字符串)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetCollectionName 获取集合名称
|
|
|
|
|
|
func (a *AppPlatformConfig) GetCollectionName() string {
|
|
|
|
|
|
return AppPlatformConfigCollection
|
|
|
|
|
|
}
|