初始化项目

This commit is contained in:
2025-12-06 10:38:48 +08:00
parent c9fcfc761e
commit 88a2753211
20 changed files with 2552 additions and 74 deletions

23
model/entity/strategy.go Normal file
View File

@@ -0,0 +1,23 @@
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// Strategy 匹配策略表
type Strategy struct {
Id int64 `json:"id" orm:"id,primary"` // ID
Name string `json:"name" orm:"name"` // 策略名称
Description string `json:"description" orm:"description"` // 描述
TenantLevel string `json:"tenant_level" orm:"tenant_level"` // 适用租户级别
MinConversion float64 `json:"min_conversion" orm:"min_conversion"` // 最低转化率
MaxConversion float64 `json:"max_conversion" orm:"max_conversion"` // 最高转化率
SourceWeights string `json:"source_weights" orm:"source_weights"` // 广告源权重 (JSON格式)
MaxAdsPerReq int `json:"max_ads_per_req" orm:"max_ads_per_req"` // 每次请求最大广告数
Priority int `json:"priority" orm:"priority"` // 优先级
Status string `json:"status" orm:"status"` // 状态: active, inactive
CreatedAt *gtime.Time `json:"created_at" orm:"created_at"` // 创建时间
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at"` // 更新时间
CreatedBy int64 `json:"created_by" orm:"created_by"` // 创建人
UpdatedBy int64 `json:"updated_by" orm:"updated_by"` // 更新人
}