first commit

This commit is contained in:
2026-09-11 01:47:20 +08:00
commit 303207d3cc
74 changed files with 8348 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
package dto
// AdminLoginRequest 管理员登录请求。
type AdminLoginRequest struct {
Username string `json:"username" binding:"required,max=32"`
Password string `json:"password" binding:"required,min=6,max=64"`
}
// AdminInfo 管理员信息。
type AdminInfo struct {
ID int64 `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Role int8 `json:"role"` // 1=超级管理员 2=普通管理员
Status int8 `json:"status"` // 1=启用 2=禁用
LastLoginTime int64 `json:"last_login_time"`
CreatedAt int64 `json:"created_at"`
}
// AdminLoginResponse 登录响应(双 token + 管理员信息)。
type AdminLoginResponse struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpireTime int64 `json:"expire_time"` // access_token 过期时间(秒)
AdminInfo AdminInfo `json:"admin_info"`
}
// AdminRefreshTokenRequest 刷新 token 请求。
type AdminRefreshTokenRequest struct {
RefreshToken string `json:"refresh_token" binding:"required"`
AccessToken string `json:"access_token"` // 可选:传入后立即吊销旧 access token
}
// AdminRefreshTokenResponse 刷新 token 响应。
type AdminRefreshTokenResponse struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpireTime int64 `json:"expire_time"`
}
// AdminChangePasswordRequest 修改自己密码请求。
type AdminChangePasswordRequest struct {
OldPassword string `json:"old_password" binding:"required,min=6,max=64"`
NewPassword string `json:"new_password" binding:"required,min=6,max=64"`
}
// AdminListRequest 管理员列表请求。
type AdminListRequest struct {
PageRequest
Status int8 `form:"status" binding:"omitempty,oneof=1 2"` // 1=启用 2=禁用;不传=全部
}
// AdminListResponse 管理员列表响应。
type AdminListResponse struct {
PageResponse
List []AdminInfo `json:"list"`
}
// AdminCreateRequest 创建管理员请求(仅超级管理员)。
type AdminCreateRequest struct {
Username string `json:"username" binding:"required,min=3,max=32"`
Password string `json:"password" binding:"required,min=6,max=64"`
Nickname string `json:"nickname" binding:"omitempty,max=32"`
Role int8 `json:"role" binding:"required,oneof=1 2"`
}
// AdminUpdateRequest 更新管理员请求(仅超级管理员;传什么改什么)。
type AdminUpdateRequest struct {
Nickname string `json:"nickname" binding:"omitempty,max=32"`
Password string `json:"password" binding:"omitempty,min=6,max=64"`
Role int8 `json:"role" binding:"omitempty,oneof=1 2"`
Status int8 `json:"status" binding:"omitempty,oneof=1 2"`
}
+14
View File
@@ -0,0 +1,14 @@
package dto
// PageRequest 分页请求参数(GET query,嵌入各列表请求)
type PageRequest struct {
Page int `form:"page" binding:"omitempty,min=1"`
PageSize int `form:"page_size" binding:"omitempty,min=1,max=50"`
}
// PageResponse 分页响应(嵌入各列表响应)
type PageResponse struct {
Total int64 `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
}
+127
View File
@@ -0,0 +1,127 @@
package dto
// OutfitListRequest 穿搭列表请求。
type OutfitListRequest struct {
PageRequest
UserID int64 `form:"user_id"`
IsPublic int8 `form:"is_public" binding:"omitempty,oneof=1 2"`
AuditStatus int8 `form:"audit_status" binding:"omitempty,oneof=1 2 3"`
Status int8 `form:"status" binding:"omitempty,oneof=1 2 3"`
Keyword string `form:"keyword"`
}
// OutfitListItem 穿搭列表项。
type OutfitListItem struct {
ID int64 `json:"id"`
OutfitUUID string `json:"outfit_uuid"`
UserID int64 `json:"user_id"`
OutfitName string `json:"outfit_name"`
OutfitDesc string `json:"outfit_desc"`
Scene string `json:"scene"`
Source int8 `json:"source"` // 1=用户创建 2=AI 推荐
IsPublic int8 `json:"is_public"` // 1=不公开 2=公开
AuditStatus int8 `json:"audit_status"` // 1=待审核 2=审核通过 3=审核不通过
Status int8 `json:"status"` // 1=正常 2=封禁 3=待用户保存
CreatedAt int64 `json:"created_at"`
}
// OutfitListResponse 穿搭列表响应。
type OutfitListResponse struct {
PageResponse
List []OutfitListItem `json:"list"`
}
// OutfitClothesItem 穿搭衣物明细项。
type OutfitClothesItem struct {
ClothesUUID string `json:"clothes_uuid"`
Name string `json:"name"`
CategoryMain string `json:"category_main"`
CategorySub string `json:"category_sub"`
ProcessedImage string `json:"processed_image"`
ImageProcessStatus int8 `json:"image_process_status"`
}
// OutfitDetailResponse 穿搭详情响应。
type OutfitDetailResponse struct {
OutfitListItem
Items []OutfitClothesItem `json:"items"`
}
// OutfitAuditRequest 穿搭审核请求。
type OutfitAuditRequest struct {
Result int8 `json:"result" binding:"required,oneof=1 2"` // 1=通过 2=驳回
Reason string `json:"reason" binding:"omitempty,max=200"` // 驳回原因(result=2 时建议填写)
}
// OutfitBanRequest 穿搭封禁/解封请求。
type OutfitBanRequest struct {
Reason string `json:"reason" binding:"omitempty,max=200"`
}
// ClothesListRequest 衣物列表请求。
type ClothesListRequest struct {
PageRequest
UserID int64 `form:"user_id"`
ImageProcessStatus int8 `form:"image_process_status" binding:"omitempty,oneof=1 2 3 4 5"`
CategoryMain string `form:"category_main"`
Keyword string `form:"keyword"`
}
// ClothesItem 衣物信息。
type ClothesItem struct {
ID int64 `json:"id"`
ClothesUUID string `json:"clothes_uuid"`
UserID int64 `json:"user_id"`
Name string `json:"name"`
CategoryMain string `json:"category_main"`
CategorySub string `json:"category_sub"`
Style string `json:"style"`
ColorMain string `json:"color_main"`
ColorSub string `json:"color_sub"`
Thickness string `json:"thickness"`
Version string `json:"version"`
Material string `json:"material"`
Pattern string `json:"pattern"`
SleeveType string `json:"sleeve_type"`
ClothesType string `json:"clothes_type"`
NecklineType string `json:"neckline_type"`
Formality string `json:"formality"`
Occasions string `json:"occasions"`
VisualImpact string `json:"visual_impact"`
Remark string `json:"remark"`
ProcessedImage string `json:"processed_image"`
ImageSize int64 `json:"image_size"`
ImageProcessStatus int8 `json:"image_process_status"`
FailReason string `json:"fail_reason"`
CreatedAt int64 `json:"created_at"`
}
// ClothesListResponse 衣物列表响应。
type ClothesListResponse struct {
PageResponse
List []ClothesItem `json:"list"`
}
// ClosetShareListRequest 衣柜分享列表请求。
type ClosetShareListRequest struct {
PageRequest
UserID int64 `form:"user_id"`
Status int8 `form:"status" binding:"omitempty,oneof=1 2 3 4"`
}
// ClosetShareItem 衣柜分享信息。
type ClosetShareItem struct {
ID int64 `json:"id"`
ShareUUID string `json:"share_uuid"`
UserID int64 `json:"user_id"`
ShareType int8 `json:"share_type"` // 1=部分衣物分享 2=全量快照分享
ExpireTime int64 `json:"expire_time"`
Status int8 `json:"status"` // 1=正常 2=已取消 3=已过期 4=已封禁
CreatedAt int64 `json:"created_at"`
}
// ClosetShareListResponse 衣柜分享列表响应。
type ClosetShareListResponse struct {
PageResponse
List []ClosetShareItem `json:"list"`
}
+146
View File
@@ -0,0 +1,146 @@
package dto
// DashboardResponse 仪表盘统计响应。
type DashboardResponse struct {
Users DashboardUsers `json:"users"`
Orders DashboardOrders `json:"orders"`
Revenue DashboardRevenue `json:"revenue"`
Todo DashboardTodo `json:"todo"`
Content DashboardContent `json:"content"`
VIP DashboardVIP `json:"vip"`
Goods DashboardGoods `json:"goods"`
Usage DashboardUsage `json:"usage"`
Social DashboardSocial `json:"social"`
}
// DashboardUsers 用户统计。
type DashboardUsers struct {
Total int64 `json:"total"` // 用户总数
TodayNew int64 `json:"today_new"` // 今日新增
Normal int64 `json:"normal"` // 正常
TempBan int64 `json:"temp_ban"` // 临时禁用
PermBan int64 `json:"perm_ban"` // 永久禁用
Deactivated int64 `json:"deactivated"` // 已注销
}
// DashboardOrders 订单统计。
type DashboardOrders struct {
Total int64 `json:"total"` // 订单总数
Pending int64 `json:"pending"` // 待支付
Paid int64 `json:"paid"` // 已支付
Cancelled int64 `json:"cancelled"` // 已取消
Expired int64 `json:"expired"` // 已过期
Refunded int64 `json:"refunded"` // 已退款
}
// DashboardRevenue 营收统计(单位:分)。
type DashboardRevenue struct {
TotalRevenue int64 `json:"total_revenue"` // 累计营收
TodayRevenue int64 `json:"today_revenue"` // 今日营收
RefundTotal int64 `json:"refund_total"` // 累计退款
}
// DashboardTodo 待办统计。
type DashboardTodo struct {
RefundPending int64 `json:"refund_pending"` // 待处理退款
OutfitPendingAudit int64 `json:"outfit_pending_audit"` // 待审核穿搭
GoodsOnShelf int64 `json:"goods_on_shelf"` // 上架商品数
}
// ===== 内容审核概况 =====
// DashboardContent 内容审核概况。
type DashboardContent struct {
Outfit DashboardOutfitStats `json:"outfit"`
Clothes DashboardClothesStats `json:"clothes"`
Share DashboardShareStats `json:"share"`
}
// DashboardOutfitStats 穿搭审核统计。
type DashboardOutfitStats struct {
Total int64 `json:"total"` // 穿搭总数
Pending int64 `json:"pending"` // 待审核
Passed int64 `json:"passed"` // 审核通过
Rejected int64 `json:"rejected"` // 审核不通过
Banned int64 `json:"banned"` // 封禁
}
// DashboardClothesStats 衣物图片处理统计。
type DashboardClothesStats struct {
Total int64 `json:"total"` // 衣物总数
Processing int64 `json:"processing"` // 处理中(抠图/分类/排队)
Success int64 `json:"success"` // 处理成功
Failed int64 `json:"failed"` // 处理失败
}
// DashboardShareStats 衣柜分享统计。
type DashboardShareStats struct {
Total int64 `json:"total"` // 分享总数
Normal int64 `json:"normal"` // 正常
Cancelled int64 `json:"cancelled"` // 用户取消
Expired int64 `json:"expired"` // 已过期
Banned int64 `json:"banned"` // 管理员封禁
}
// ===== VIP 会员概况 =====
// DashboardVIP 会员概况。
type DashboardVIP struct {
MemberTotal int64 `json:"member_total"` // 有效会员总数(月度/年度/体验)
Monthly int64 `json:"monthly"` // 月度会员
Yearly int64 `json:"yearly"` // 年度会员
Trial int64 `json:"trial"` // 体验会员
ExpiringSoon int64 `json:"expiring_soon"` // 7天内即将到期
}
// ===== 商品分类统计 =====
// DashboardGoods 商品统计。
type DashboardGoods struct {
Total int64 `json:"total"`
OnShelf int64 `json:"on_shelf"`
OffShelf int64 `json:"off_shelf"`
ByType []GoodsTypeCount `json:"by_type"`
}
// GoodsTypeCount 商品类型数量。
type GoodsTypeCount struct {
Type int8 `json:"type"` // 1会员包 2上传包 3AI推荐包 4衣柜分享包 5搭配分享包
Count int64 `json:"count"`
}
// ===== 趋势 =====
// TrendRequest 趋势查询参数。
type TrendRequest struct {
Days int `form:"days" binding:"omitempty,min=1,max=90"`
}
// TrendResponse 趋势响应。
type TrendResponse struct {
Points []TrendPoint `json:"points"`
}
// TrendPoint 单日趋势点。
type TrendPoint struct {
Date string `json:"date"` // YYYY-MM-DD
NewUsers int64 `json:"new_users"` // 新增用户
Orders int64 `json:"orders"` // 已支付订单量
Revenue int64 `json:"revenue"` // 营收(分)
}
// ===== 今日消耗与互动 =====
// DashboardUsage 今日消耗统计。
type DashboardUsage struct {
AIRecommend int64 `json:"ai_recommend"` // 今日AI推荐消耗次数
ClosetShare int64 `json:"closet_share"` // 今日衣柜分享消耗次数
OutfitShare int64 `json:"outfit_share"` // 今日社区分享消耗次数
}
// DashboardSocial 内容互动统计。
type DashboardSocial struct {
CosImageCount int64 `json:"cos_image_count"` // COS总图数
LikeCount int64 `json:"like_count"` // 点赞数
CollectCount int64 `json:"collect_count"` // 收藏数
}
+73
View File
@@ -0,0 +1,73 @@
package dto
// GoodsListRequest 商品列表请求。
type GoodsListRequest struct {
PageRequest
GoodsType int8 `form:"goods_type" binding:"omitempty,oneof=1 2 3 4 5"`
Status int8 `form:"status" binding:"omitempty,oneof=1 2"` // 1=上架 2=下架;不传=全部
Keyword string `form:"keyword"`
}
// GoodsItem 商品信息。
type GoodsItem struct {
ID int64 `json:"id"`
GoodsCode string `json:"goods_code"`
GoodsName string `json:"goods_name"`
GoodsType int8 `json:"goods_type"` // 1=会员包 2=上传包 3=AI 推荐包 4=衣柜分享包 5=搭配分享包
Price int64 `json:"price"` // 原价(分)
DiscountPrice int64 `json:"discount_price"`
MemberDays int64 `json:"member_days"`
UploadQuota int64 `json:"upload_quota"` // 上传额度(对应业务表 cos_quota)
AIRecommendQuota int64 `json:"ai_recommend_quota"` // AI 推荐额度
ClosetShareQuota int64 `json:"closet_share_quota"` // 衣柜分享额度
OutfitShareQuota int64 `json:"outfit_share_quota"` // 搭配分享额度
ValidDays int64 `json:"valid_days"` // 赠送额度有效期天数(加量包;会员包 0=跟随 VIP)
Description string `json:"description"`
Status int8 `json:"status"` // 1=上架 2=下架
ProductID string `json:"product_id"` // 虚拟支付道具ID(只读,空=未发布)
ProductStatus int8 `json:"product_status"` // 虚拟支付道具发布状态 0=未发布 1=发布中 2=已发布 3=发布失败(只读)
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
// GoodsListResponse 商品列表响应。
type GoodsListResponse struct {
PageResponse
List []GoodsItem `json:"list"`
}
// GoodsCreateRequest 创建商品请求。
type GoodsCreateRequest struct {
GoodsCode string `json:"goods_code" binding:"required,max=64"`
GoodsName string `json:"goods_name" binding:"required,max=64"`
GoodsType int8 `json:"goods_type" binding:"required,oneof=1 2 3 4 5"`
Price int64 `json:"price" binding:"required,min=0,max=100000000"`
DiscountPrice int64 `json:"discount_price" binding:"required,min=0,max=100000000"`
MemberDays int64 `json:"member_days" binding:"omitempty,min=0"`
UploadQuota int64 `json:"upload_quota" binding:"omitempty,min=0"`
AIRecommendQuota int64 `json:"ai_recommend_quota" binding:"omitempty,min=0"`
ClosetShareQuota int64 `json:"closet_share_quota" binding:"omitempty,min=0"`
OutfitShareQuota int64 `json:"outfit_share_quota" binding:"omitempty,min=0"`
ValidDays int64 `json:"valid_days" binding:"omitempty,min=0,max=3650"`
Description string `json:"description" binding:"omitempty,max=500"`
Status int8 `json:"status" binding:"omitempty,oneof=1 2"`
}
// GoodsUpdateRequest 更新商品请求(传什么改什么)。
type GoodsUpdateRequest struct {
GoodsName *string `json:"goods_name" binding:"omitempty,max=64"`
Price *int64 `json:"price" binding:"omitempty,min=0,max=100000000"`
DiscountPrice *int64 `json:"discount_price" binding:"omitempty,min=0,max=100000000"`
MemberDays *int64 `json:"member_days" binding:"omitempty,min=0"`
UploadQuota *int64 `json:"upload_quota" binding:"omitempty,min=0"`
AIRecommendQuota *int64 `json:"ai_recommend_quota" binding:"omitempty,min=0"`
ClosetShareQuota *int64 `json:"closet_share_quota" binding:"omitempty,min=0"`
OutfitShareQuota *int64 `json:"outfit_share_quota" binding:"omitempty,min=0"`
ValidDays *int64 `json:"valid_days" binding:"omitempty,min=0,max=3650"`
Description *string `json:"description" binding:"omitempty,max=500"`
}
// GoodsStatusRequest 商品上下架请求。
type GoodsStatusRequest struct {
Status int8 `json:"status" binding:"required,oneof=1 2"` // 1=上架 2=下架
}
+19
View File
@@ -0,0 +1,19 @@
package dto
// NotificationSendRequest 单用户通知请求。
type NotificationSendRequest struct {
UserID int64 `json:"user_id" binding:"required,min=1"`
Title string `json:"title" binding:"required,max=64"`
Content string `json:"content" binding:"required,max=500"`
}
// NotificationBroadcastRequest 全量广播请求。
type NotificationBroadcastRequest struct {
Title string `json:"title" binding:"required,max=64"`
Content string `json:"content" binding:"required,max=500"`
}
// NotificationBroadcastResponse 广播结果。
type NotificationBroadcastResponse struct {
SentCount int64 `json:"sent_count"` // 已发送用户数
}
+76
View File
@@ -0,0 +1,76 @@
package dto
// OrderListRequest 订单列表请求。
type OrderListRequest struct {
PageRequest
OrderNo string `form:"order_no"` // 订单号(精确)
UserID int64 `form:"user_id"` // 用户 ID
Status int8 `form:"status" binding:"omitempty,oneof=1 2 3 4 5"`
}
// OrderItem 订单信息(金额单位:分)。
type OrderItem struct {
OrderNo string `json:"order_no"`
UserID int64 `json:"user_id"`
GoodsID int64 `json:"goods_id"`
GoodsName string `json:"goods_name"`
UnitPrice int64 `json:"unit_price"`
TotalAmount int64 `json:"total_amount"`
PayAmount int64 `json:"pay_amount"`
PayChannel int8 `json:"pay_channel"` // 1=微信支付 2=微信虚拟支付
OrderStatus int8 `json:"order_status"`
TransactionID string `json:"transaction_id"`
MemberDays int64 `json:"member_days"`
UploadQuota int64 `json:"upload_quota"`
AIRecommendQuota int64 `json:"ai_recommend_quota"`
ClosetShareQuota int64 `json:"closet_share_quota"`
OutfitShareQuota int64 `json:"outfit_share_quota"`
ExpireTime int64 `json:"expire_time"`
PayTime int64 `json:"pay_time"`
RefundTime int64 `json:"refund_time"`
RefundAmount int64 `json:"refund_amount"`
Remark string `json:"remark"`
XPayProductID string `json:"xpay_product_id"` // 虚拟支付道具ID(pay_channel=2 时使用)
XPayPlatform string `json:"xpay_platform"` // 虚拟支付平台 android/ios/harmony/windows
XPayEnv int8 `json:"xpay_env"` // 虚拟支付环境 0=现网 1=沙箱
CreatedAt int64 `json:"created_at"`
}
// OrderListResponse 订单列表响应。
type OrderListResponse struct {
PageResponse
List []OrderItem `json:"list"`
}
// RefundListRequest 退款单列表请求。
// Status 用指针区分「未传(nil,不过滤)」与「显式传 0(筛选待处理)」。
type RefundListRequest struct {
PageRequest
Status *int8 `form:"status" binding:"omitempty,oneof=0 1 2 3"` // 0=待处理 1=退款中 2=成功 3=失败;不传=全部
OrderNo string `form:"order_no"`
}
// RefundItem 退款单信息。
type RefundItem struct {
RefundNo string `json:"refund_no"`
OrderNo string `json:"order_no"`
UserID int64 `json:"user_id"`
RefundAmount int64 `json:"refund_amount"`
RefundReason string `json:"refund_reason"`
Status int8 `json:"status"` // 0=待处理 1=退款中 2=退款成功 3=退款失败
ApplyTime int64 `json:"apply_time"`
SuccessTime int64 `json:"success_time"`
FailReason string `json:"fail_reason"`
CreatedAt int64 `json:"created_at"`
}
// RefundListResponse 退款单列表响应。
type RefundListResponse struct {
PageResponse
List []RefundItem `json:"list"`
}
// RefundAuditRequest 退款审核请求。
type RefundAuditRequest struct {
Reason string `json:"reason" binding:"required,max=200"` // 通过=审核备注;驳回=驳回原因
}
+91
View File
@@ -0,0 +1,91 @@
package dto
// UserListRequest 用户列表请求。
type UserListRequest struct {
PageRequest
Keyword string `form:"keyword"` // 模糊匹配昵称/手机号/OpenID
Status int8 `form:"status" binding:"omitempty,oneof=1 2 3 4"` // 1=正常 2=临时禁用 3=永久禁用 4=已注销
}
// UserListItem 用户列表项。
type UserListItem struct {
ID int64 `json:"id"`
UserUUID string `json:"user_uuid"`
Username string `json:"username"`
Avatar string `json:"avatar"`
Sex int8 `json:"sex"`
Phone string `json:"phone"`
Status int8 `json:"status"` // 1=正常 2=临时禁用 3=永久禁用 4=已注销
BanReason string `json:"ban_reason"`
BanStart int64 `json:"ban_start"`
BanExpire int64 `json:"ban_expire"`
VIPType int8 `json:"vip_type"` // 1=非会员 2=月度会员 3=年度会员 4=体验会员
VIPExpire int64 `json:"vip_expire"` // VIP 到期时间(秒),已过期时归一为 0
LastLoginTime int64 `json:"last_login_time"`
CreatedAt int64 `json:"created_at"`
}
// UserListResponse 用户列表响应。
type UserListResponse struct {
PageResponse
List []UserListItem `json:"list"`
}
// QuotaItem 用户某类额度。
// Cos(quota_type=1):Total=永久总额度、Used=永久累计已用、Remain=永久剩余;
// AI/社区/衣柜(2/3/4):Total=每日总额度、Used=当日已用、Remain=当日剩余(次日 0 点重置)。
type QuotaItem struct {
QuotaType int8 `json:"quota_type"` // 1=上传 2=AI 3=社区分享 4=衣柜分享
Total int64 `json:"total"` // 总额度(Cos 永久 / 每日额度)
Used int64 `json:"used"` // 已用(Cos 永久累计 / 当日已用)
Remain int64 `json:"remain"` // 剩余
}
// UserGrantItem 用户额度凭证(有有效期赠送额度)。
type UserGrantItem struct {
ID int64 `json:"id"`
QuotaType int8 `json:"quota_type"` // 1=上传 2=AI 3=社区分享 4=衣柜分享
Amount int64 `json:"amount"` // 赠送总量(Cos=一次性库存;AI/社区/衣柜=有效期内每日加量)
Used int64 `json:"used"` // 已用量(仅 Cos 扣减)
Source int8 `json:"source"` // 1=会员包 2=加量包 3=广告激励
ExpireTime int64 `json:"expire_time"` // 到期时间(秒,0=跟随 VIP)
RefID string `json:"ref_id"` // 关联ID(订单号/广告记录ID/人工发放标识)
CreatedAt int64 `json:"created_at"`
}
// UserDetailResponse 用户详情响应。
type UserDetailResponse struct {
UserListItem
Quotas []QuotaItem `json:"quotas"`
Grants []UserGrantItem `json:"grants"`
}
// UserBanRequest 封禁用户请求。
type UserBanRequest struct {
BanType int8 `json:"ban_type" binding:"required,oneof=1 2"` // 1=临时禁用 2=永久禁用
BanDays int `json:"ban_days" binding:"omitempty,min=1,max=3650"` // 临时禁用天数(ban_type=1 时必填)
Reason string `json:"reason" binding:"required,max=200"`
}
// UserUnbanRequest 解封用户请求。
type UserUnbanRequest struct {
Reason string `json:"reason" binding:"omitempty,max=200"`
}
// UserQuotaAdjustRequest 额度发放请求(发放有有效期额度凭证)。
// Cos(quota_type=1):Amount 为一次性库存,ExpireDays 天内有效;
// AI/社区/衣柜(2/3/4):Amount 为有效期内每天额外赠送次数,ExpireDays 天内有效。
type UserQuotaAdjustRequest struct {
QuotaType int8 `json:"quota_type" binding:"required,oneof=1 2 3 4"` // 1=上传 2=AI 3=社区分享 4=衣柜分享
Amount int64 `json:"amount" binding:"required,min=1,max=100000000"` // 发放数量
ExpireDays int64 `json:"expire_days" binding:"required,min=1,max=3650"` // 有效期天数
}
// UserVIPAdjustRequest VIP 人工调整请求。
// 叠加语义(与购买发放一致):vip_expire = max(当前到期, now) + vip_days*86400。
// vip_days=0 表示取消会员(vip_type 归 1、到期清零)。
type UserVIPAdjustRequest struct {
VIPType int8 `json:"vip_type" binding:"required,oneof=1 2 3 4"` // 1=非会员 2=月度会员 3=年度会员 4=体验会员
VIPDays int64 `json:"vip_days" binding:"omitempty,min=0,max=3650"`
Reason string `json:"reason" binding:"required,max=200"`
}