初始化项目

This commit is contained in:
2025-12-06 15:24:30 +08:00
parent 88a2753211
commit fd08b8925f
59 changed files with 2456 additions and 447 deletions

View File

@@ -6,18 +6,19 @@ import (
// 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"` // 更新
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"` // 每次请求最大广告数
MaxReqPerHour int `json:"max_req_per_hour" orm:"max_req_per_hour"` // 每小时最大请求次数
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"` // 更新人
}