237 lines
9.0 KiB
Go
237 lines
9.0 KiB
Go
package dto
|
||
|
||
import (
|
||
"quyun/v2/app/requests"
|
||
"quyun/v2/pkg/consts"
|
||
)
|
||
|
||
// SuperUserNotificationListFilter 超管用户通知列表过滤条件。
|
||
type SuperUserNotificationListFilter struct {
|
||
requests.Pagination
|
||
// TenantID 租户ID过滤(为空表示全部)。
|
||
TenantID *int64 `query:"tenant_id"`
|
||
// Type 通知类型过滤(system/order/interaction)。
|
||
Type *string `query:"type"`
|
||
// Read 是否已读过滤。
|
||
Read *bool `query:"read"`
|
||
// CreatedAtFrom 创建时间起始(RFC3339)。
|
||
CreatedAtFrom *string `query:"created_at_from"`
|
||
// CreatedAtTo 创建时间结束(RFC3339)。
|
||
CreatedAtTo *string `query:"created_at_to"`
|
||
}
|
||
|
||
// SuperUserNotificationItem 超管用户通知列表项。
|
||
type SuperUserNotificationItem 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"`
|
||
// Type 通知类型。
|
||
Type string `json:"type"`
|
||
// Title 通知标题。
|
||
Title string `json:"title"`
|
||
// Content 通知内容。
|
||
Content string `json:"content"`
|
||
// Read 是否已读。
|
||
Read bool `json:"read"`
|
||
// CreatedAt 发送时间(RFC3339)。
|
||
CreatedAt string `json:"created_at"`
|
||
}
|
||
|
||
// SuperUserCouponListFilter 超管用户优惠券列表过滤条件。
|
||
type SuperUserCouponListFilter struct {
|
||
requests.Pagination
|
||
// TenantID 租户ID过滤(为空表示全部)。
|
||
TenantID *int64 `query:"tenant_id"`
|
||
// TenantCode 租户编码(模糊匹配)。
|
||
TenantCode *string `query:"tenant_code"`
|
||
// TenantName 租户名称(模糊匹配)。
|
||
TenantName *string `query:"tenant_name"`
|
||
// Status 用户券状态过滤(unused/used/expired)。
|
||
Status *consts.UserCouponStatus `query:"status"`
|
||
// Type 券模板类型过滤(fix_amount/discount)。
|
||
Type *consts.CouponType `query:"type"`
|
||
// Keyword 标题或描述关键词(模糊匹配)。
|
||
Keyword *string `query:"keyword"`
|
||
// CreatedAtFrom 领取时间起始(RFC3339)。
|
||
CreatedAtFrom *string `query:"created_at_from"`
|
||
// CreatedAtTo 领取时间结束(RFC3339)。
|
||
CreatedAtTo *string `query:"created_at_to"`
|
||
}
|
||
|
||
// SuperUserCouponItem 超管用户优惠券列表项。
|
||
type SuperUserCouponItem struct {
|
||
// ID 用户券ID。
|
||
ID int64 `json:"id"`
|
||
// CouponID 券模板ID。
|
||
CouponID int64 `json:"coupon_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"`
|
||
// StartAt 生效时间(RFC3339)。
|
||
StartAt string `json:"start_at"`
|
||
// EndAt 过期时间(RFC3339)。
|
||
EndAt string `json:"end_at"`
|
||
// Status 用户券状态。
|
||
Status consts.UserCouponStatus `json:"status"`
|
||
// StatusDescription 用户券状态描述(用于展示)。
|
||
StatusDescription string `json:"status_description"`
|
||
// OrderID 使用订单ID(未使用为0)。
|
||
OrderID int64 `json:"order_id"`
|
||
// UsedAt 使用时间(RFC3339)。
|
||
UsedAt string `json:"used_at"`
|
||
// CreatedAt 领取时间(RFC3339)。
|
||
CreatedAt string `json:"created_at"`
|
||
}
|
||
|
||
// SuperUserRealNameResponse 超管实名认证详情。
|
||
type SuperUserRealNameResponse struct {
|
||
// IsRealNameVerified 是否已实名认证。
|
||
IsRealNameVerified bool `json:"is_real_name_verified"`
|
||
// VerifiedAt 实名认证时间(RFC3339)。
|
||
VerifiedAt string `json:"verified_at"`
|
||
// RealName 真实姓名(来自用户元数据)。
|
||
RealName string `json:"real_name"`
|
||
// IDCardMasked 身份证号脱敏展示。
|
||
IDCardMasked string `json:"id_card_masked"`
|
||
}
|
||
|
||
// SuperUserProfileUpdateForm 超管用户资料更新表单。
|
||
type SuperUserProfileUpdateForm struct {
|
||
// Nickname 昵称(可选,空字符串表示清空)。
|
||
Nickname *string `json:"nickname"`
|
||
// Avatar 头像URL(可选,空字符串表示清空)。
|
||
Avatar *string `json:"avatar"`
|
||
// Gender 性别(可选)。
|
||
Gender *consts.Gender `json:"gender"`
|
||
// Bio 个人简介(可选,空字符串表示清空)。
|
||
Bio *string `json:"bio"`
|
||
// IsRealNameVerified 是否已实名认证(可选)。
|
||
IsRealNameVerified *bool `json:"is_real_name_verified"`
|
||
// RealName 真实姓名(可选,用于更新实名认证信息)。
|
||
RealName *string `json:"real_name"`
|
||
// IDCard 身份证号(可选,用于更新实名认证信息)。
|
||
IDCard *string `json:"id_card"`
|
||
}
|
||
|
||
// SuperUserContentActionListFilter 超管用户互动内容列表过滤条件。
|
||
type SuperUserContentActionListFilter struct {
|
||
requests.Pagination
|
||
// TenantID 内容所属租户ID,精确匹配。
|
||
TenantID *int64 `query:"tenant_id"`
|
||
// TenantCode 租户编码,模糊匹配。
|
||
TenantCode *string `query:"tenant_code"`
|
||
// TenantName 租户名称,模糊匹配。
|
||
TenantName *string `query:"tenant_name"`
|
||
// ContentID 内容ID,精确匹配。
|
||
ContentID *int64 `query:"content_id"`
|
||
// Keyword 内容标题/摘要/描述关键字,模糊匹配。
|
||
Keyword *string `query:"keyword"`
|
||
// CreatedAtFrom 互动时间起始(RFC3339)。
|
||
CreatedAtFrom *string `query:"created_at_from"`
|
||
// CreatedAtTo 互动时间结束(RFC3339)。
|
||
CreatedAtTo *string `query:"created_at_to"`
|
||
// Asc 升序字段(id/created_at)。
|
||
Asc *string `query:"asc"`
|
||
// Desc 降序字段(id/created_at)。
|
||
Desc *string `query:"desc"`
|
||
}
|
||
|
||
// SuperUserContentActionItem 超管用户互动内容条目。
|
||
type SuperUserContentActionItem struct {
|
||
// ActionID 互动记录ID。
|
||
ActionID int64 `json:"action_id"`
|
||
// ActionType 互动类型(like/favorite)。
|
||
ActionType consts.UserContentActionType `json:"action_type"`
|
||
// ActionAt 互动发生时间(RFC3339)。
|
||
ActionAt string `json:"action_at"`
|
||
// Content 互动对应内容详情(含租户与作者信息)。
|
||
Content *AdminContentItem `json:"content"`
|
||
}
|
||
|
||
// SuperUserLibraryListFilter 超管用户内容消费列表过滤条件。
|
||
type SuperUserLibraryListFilter struct {
|
||
requests.Pagination
|
||
// TenantID 内容所属租户ID,精确匹配。
|
||
TenantID *int64 `query:"tenant_id"`
|
||
// TenantCode 租户编码,模糊匹配。
|
||
TenantCode *string `query:"tenant_code"`
|
||
// TenantName 租户名称,模糊匹配。
|
||
TenantName *string `query:"tenant_name"`
|
||
// ContentID 内容ID,精确匹配。
|
||
ContentID *int64 `query:"content_id"`
|
||
// Keyword 内容标题/摘要/描述关键字,模糊匹配。
|
||
Keyword *string `query:"keyword"`
|
||
// Status 内容访问状态过滤(active/revoked/expired)。
|
||
Status *consts.ContentAccessStatus `query:"status"`
|
||
// OrderID 订单ID,精确匹配。
|
||
OrderID *int64 `query:"order_id"`
|
||
// OrderStatus 订单状态过滤。
|
||
OrderStatus *consts.OrderStatus `query:"order_status"`
|
||
// PaidAtFrom 支付时间起始(RFC3339)。
|
||
PaidAtFrom *string `query:"paid_at_from"`
|
||
// PaidAtTo 支付时间结束(RFC3339)。
|
||
PaidAtTo *string `query:"paid_at_to"`
|
||
// AccessedAtFrom 获取访问权限时间起始(RFC3339)。
|
||
AccessedAtFrom *string `query:"accessed_at_from"`
|
||
// AccessedAtTo 获取访问权限时间结束(RFC3339)。
|
||
AccessedAtTo *string `query:"accessed_at_to"`
|
||
// Asc 升序字段(id/created_at)。
|
||
Asc *string `query:"asc"`
|
||
// Desc 降序字段(id/created_at)。
|
||
Desc *string `query:"desc"`
|
||
}
|
||
|
||
// SuperUserLibraryItem 超管用户内容消费条目。
|
||
type SuperUserLibraryItem struct {
|
||
// AccessID 访问记录ID。
|
||
AccessID int64 `json:"access_id"`
|
||
// TenantID 内容所属租户ID。
|
||
TenantID int64 `json:"tenant_id"`
|
||
// ContentID 内容ID。
|
||
ContentID int64 `json:"content_id"`
|
||
// OrderID 订单ID。
|
||
OrderID int64 `json:"order_id"`
|
||
// OrderType 订单类型。
|
||
OrderType consts.OrderType `json:"order_type"`
|
||
// OrderStatus 订单状态。
|
||
OrderStatus consts.OrderStatus `json:"order_status"`
|
||
// OrderStatusDescription 订单状态描述(用于展示)。
|
||
OrderStatusDescription string `json:"order_status_description"`
|
||
// AmountPaid 该内容实付金额(分)。
|
||
AmountPaid int64 `json:"amount_paid"`
|
||
// PaidAt 支付时间(RFC3339)。
|
||
PaidAt string `json:"paid_at"`
|
||
// AccessStatus 访问状态。
|
||
AccessStatus consts.ContentAccessStatus `json:"access_status"`
|
||
// AccessStatusDescription 访问状态描述(用于展示)。
|
||
AccessStatusDescription string `json:"access_status_description"`
|
||
// AccessedAt 获取访问权限时间(RFC3339)。
|
||
AccessedAt string `json:"accessed_at"`
|
||
// Content 内容详情(含租户/作者/价格)。
|
||
Content *AdminContentItem `json:"content"`
|
||
// Snapshot 下单快照(内容标题/金额等)。
|
||
Snapshot any `json:"snapshot"`
|
||
}
|