初始化项目

This commit is contained in:
2025-12-06 15:41:38 +08:00
parent fd08b8925f
commit a42cca3c24
11 changed files with 59 additions and 59 deletions

View File

@@ -6,7 +6,7 @@ import (
// CreateStrategyReq 创建策略请求
type CreateStrategyReq struct {
g.Meta `path:"/strategy" method:"post" tags:"策略管理" summary:"创建匹配策略" dc:"创建新的广告匹配策略"`
g.Meta `path:"/create" method:"post" tags:"策略管理" summary:"创建匹配策略" dc:"创建新的广告匹配策略"`
Name string `json:"name" v:"required|length:3,50"` // 策略名称
Description string `json:"description" v:"max:500"` // 描述
TenantLevel string `json:"tenant_level" v:"required|in:basic,standard,premium"` // 租户级别
@@ -21,7 +21,7 @@ type CreateStrategyReq struct {
// UpdateStrategyReq 更新策略请求
type UpdateStrategyReq struct {
g.Meta `path:"/strategy" method:"put" tags:"策略管理" summary:"更新匹配策略" dc:"更新现有的广告匹配策略"`
g.Meta `path:"/update" method:"put" tags:"策略管理" summary:"更新匹配策略" dc:"更新现有的广告匹配策略"`
Id int64 `json:"id" v:"required"` // 策略ID
Name string `json:"name" v:"required|length:3,50"` // 策略名称
Description string `json:"description" v:"max:500"` // 描述
@@ -37,19 +37,19 @@ type UpdateStrategyReq struct {
// DeleteStrategyReq 删除策略请求
type DeleteStrategyReq struct {
g.Meta `path:"/strategy" method:"delete" tags:"策略管理" summary:"删除匹配策略" dc:"删除指定的广告匹配策略"`
g.Meta `path:"/delete" method:"delete" tags:"策略管理" summary:"删除匹配策略" dc:"删除指定的广告匹配策略"`
Id int64 `json:"id" v:"required"` // 策略ID
}
// GetStrategyReq 获取策略请求
type GetStrategyReq struct {
g.Meta `path:"/strategy" method:"get" tags:"策略管理" summary:"获取策略详情" dc:"获取指定策略的详细信息"`
g.Meta `path:"/getByID" method:"get" tags:"策略管理" summary:"获取策略详情" dc:"获取指定策略的详细信息"`
Id int64 `json:"id" v:"required"` // 策略ID
}
// GetStrategyListReq 获取策略列表请求
type GetStrategyListReq struct {
g.Meta `path:"/strategies" method:"get" tags:"策略管理" summary:"获取策略列表" dc:"分页获取策略列表"`
g.Meta `path:"/getList" method:"get" tags:"策略管理" summary:"获取策略列表" dc:"分页获取策略列表"`
Page int `json:"page" v:"required|min:1"` // 页码
Size int `json:"size" v:"required|min:1|max:100"` // 每页数量
TenantLevel string `json:"tenant_level"` // 租户级别筛选