feat: wire superadmin p1 data
This commit is contained in:
75
backend/app/http/super/v1/dto/super_coupon.go
Normal file
75
backend/app/http/super/v1/dto/super_coupon.go
Normal file
@@ -0,0 +1,75 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"quyun/v2/app/requests"
|
||||
"quyun/v2/pkg/consts"
|
||||
)
|
||||
|
||||
// SuperCouponListFilter 超管优惠券列表过滤条件。
|
||||
type SuperCouponListFilter struct {
|
||||
requests.Pagination
|
||||
// ID 优惠券ID,精确匹配。
|
||||
ID *int64 `query:"id"`
|
||||
// TenantID 租户ID,精确匹配。
|
||||
TenantID *int64 `query:"tenant_id"`
|
||||
// TenantCode 租户编码,模糊匹配。
|
||||
TenantCode *string `query:"tenant_code"`
|
||||
// TenantName 租户名称,模糊匹配。
|
||||
TenantName *string `query:"tenant_name"`
|
||||
// Keyword 标题或描述关键词,模糊匹配。
|
||||
Keyword *string `query:"keyword"`
|
||||
// Type 优惠券类型过滤(fix_amount/discount)。
|
||||
Type *string `query:"type"`
|
||||
// Status 状态过滤(active/expired/upcoming)。
|
||||
Status *string `query:"status"`
|
||||
// CreatedAtFrom 创建时间起始(RFC3339)。
|
||||
CreatedAtFrom *string `query:"created_at_from"`
|
||||
// CreatedAtTo 创建时间结束(RFC3339)。
|
||||
CreatedAtTo *string `query:"created_at_to"`
|
||||
// Asc 升序字段(id/created_at/start_at/end_at)。
|
||||
Asc *string `query:"asc"`
|
||||
// Desc 降序字段(id/created_at/start_at/end_at)。
|
||||
Desc *string `query:"desc"`
|
||||
}
|
||||
|
||||
// SuperCouponItem 超管优惠券列表项。
|
||||
type SuperCouponItem struct {
|
||||
// ID 优惠券ID。
|
||||
ID int64 `json:"id"`
|
||||
// TenantID 租户ID。
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
// TenantCode 租户编码。
|
||||
TenantCode string `json:"tenant_code"`
|
||||
// TenantName 租户名称。
|
||||
TenantName string `json:"tenant_name"`
|
||||
// Title 优惠券标题。
|
||||
Title string `json:"title"`
|
||||
// Description 优惠券描述。
|
||||
Description string `json:"description"`
|
||||
// Type 优惠券类型。
|
||||
Type consts.CouponType `json:"type"`
|
||||
// TypeDescription 类型描述(用于展示)。
|
||||
TypeDescription string `json:"type_description"`
|
||||
// Value 优惠券面额/折扣值。
|
||||
Value int64 `json:"value"`
|
||||
// MinOrderAmount 最低订单金额门槛。
|
||||
MinOrderAmount int64 `json:"min_order_amount"`
|
||||
// MaxDiscount 最大折扣金额(折扣券)。
|
||||
MaxDiscount int64 `json:"max_discount"`
|
||||
// TotalQuantity 总发行数量(0 表示不限量)。
|
||||
TotalQuantity int32 `json:"total_quantity"`
|
||||
// UsedQuantity 已使用数量。
|
||||
UsedQuantity int32 `json:"used_quantity"`
|
||||
// Status 状态(active/expired/upcoming)。
|
||||
Status string `json:"status"`
|
||||
// StatusDescription 状态描述(用于展示)。
|
||||
StatusDescription string `json:"status_description"`
|
||||
// StartAt 生效时间(RFC3339)。
|
||||
StartAt string `json:"start_at"`
|
||||
// EndAt 结束时间(RFC3339)。
|
||||
EndAt string `json:"end_at"`
|
||||
// CreatedAt 创建时间(RFC3339)。
|
||||
CreatedAt string `json:"created_at"`
|
||||
// UpdatedAt 更新时间(RFC3339)。
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
27
backend/app/http/super/v1/dto/super_report.go
Normal file
27
backend/app/http/super/v1/dto/super_report.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package dto
|
||||
|
||||
// SuperReportOverviewFilter 超管报表查询条件。
|
||||
type SuperReportOverviewFilter struct {
|
||||
// TenantID 租户ID(不传代表全平台)。
|
||||
TenantID *int64 `query:"tenant_id"`
|
||||
// StartAt 统计开始时间(RFC3339,可选;默认当前时间往前 7 天)。
|
||||
StartAt *string `query:"start_at"`
|
||||
// EndAt 统计结束时间(RFC3339,可选;默认当前时间)。
|
||||
EndAt *string `query:"end_at"`
|
||||
// Granularity 统计粒度(day;目前仅支持 day)。
|
||||
Granularity *string `query:"granularity"`
|
||||
}
|
||||
|
||||
// SuperReportExportForm 超管报表导出参数。
|
||||
type SuperReportExportForm struct {
|
||||
// TenantID 租户ID(不传代表全平台)。
|
||||
TenantID *int64 `json:"tenant_id"`
|
||||
// StartAt 统计开始时间(RFC3339,可选;默认当前时间往前 7 天)。
|
||||
StartAt *string `json:"start_at"`
|
||||
// EndAt 统计结束时间(RFC3339,可选;默认当前时间)。
|
||||
EndAt *string `json:"end_at"`
|
||||
// Granularity 统计粒度(day;目前仅支持 day)。
|
||||
Granularity *string `json:"granularity"`
|
||||
// Format 导出格式(仅支持 csv)。
|
||||
Format string `json:"format"`
|
||||
}
|
||||
7
backend/app/http/super/v1/dto/super_withdrawal.go
Normal file
7
backend/app/http/super/v1/dto/super_withdrawal.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package dto
|
||||
|
||||
// SuperWithdrawalRejectForm 超管驳回提现表单。
|
||||
type SuperWithdrawalRejectForm struct {
|
||||
// Reason 驳回原因。
|
||||
Reason string `json:"reason" validate:"required"`
|
||||
}
|
||||
Reference in New Issue
Block a user