101 lines
3.6 KiB
Go
101 lines
3.6 KiB
Go
package dto
|
||
|
||
import (
|
||
"quyun/v2/app/requests"
|
||
"quyun/v2/pkg/consts"
|
||
)
|
||
|
||
// SuperPayoutAccountListFilter 超管结算账户列表过滤条件。
|
||
type SuperPayoutAccountListFilter struct {
|
||
requests.Pagination
|
||
// TenantID 租户ID过滤(精确匹配)。
|
||
TenantID *int64 `query:"tenant_id"`
|
||
// TenantCode 租户编码过滤(模糊匹配)。
|
||
TenantCode *string `query:"tenant_code"`
|
||
// TenantName 租户名称过滤(模糊匹配)。
|
||
TenantName *string `query:"tenant_name"`
|
||
// UserID 用户ID过滤(精确匹配)。
|
||
UserID *int64 `query:"user_id"`
|
||
// Username 用户名过滤(模糊匹配)。
|
||
Username *string `query:"username"`
|
||
// Type 账户类型过滤(bank/alipay)。
|
||
Type *string `query:"type"`
|
||
// Status 审核状态过滤(pending/approved/rejected)。
|
||
Status *consts.PayoutAccountStatus `query:"status"`
|
||
// CreatedAtFrom 创建时间起始(RFC3339)。
|
||
CreatedAtFrom *string `query:"created_at_from"`
|
||
// CreatedAtTo 创建时间结束(RFC3339)。
|
||
CreatedAtTo *string `query:"created_at_to"`
|
||
}
|
||
|
||
// SuperPayoutAccountItem 超管结算账户列表项。
|
||
type SuperPayoutAccountItem 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"`
|
||
// UserID 用户ID。
|
||
UserID int64 `json:"user_id"`
|
||
// Username 用户名。
|
||
Username string `json:"username"`
|
||
// Type 账户类型。
|
||
Type string `json:"type"`
|
||
// Name 账户名称/开户行。
|
||
Name string `json:"name"`
|
||
// Account 收款账号。
|
||
Account string `json:"account"`
|
||
// Realname 收款人姓名。
|
||
Realname string `json:"realname"`
|
||
// Status 审核状态。
|
||
Status consts.PayoutAccountStatus `json:"status"`
|
||
// StatusDescription 审核状态描述(用于展示)。
|
||
StatusDescription string `json:"status_description"`
|
||
// ReviewedBy 审核操作者ID。
|
||
ReviewedBy int64 `json:"reviewed_by"`
|
||
// ReviewedAt 审核时间(RFC3339)。
|
||
ReviewedAt string `json:"reviewed_at"`
|
||
// ReviewReason 审核说明/驳回原因。
|
||
ReviewReason string `json:"review_reason"`
|
||
// CreatedAt 创建时间(RFC3339)。
|
||
CreatedAt string `json:"created_at"`
|
||
// UpdatedAt 更新时间(RFC3339)。
|
||
UpdatedAt string `json:"updated_at"`
|
||
}
|
||
|
||
type SuperPayoutAccountReviewForm struct {
|
||
// Action 审核动作(approve/reject)。
|
||
Action string `json:"action" validate:"required,oneof=approve reject"`
|
||
// Reason 审核说明(驳回时必填)。
|
||
Reason string `json:"reason"`
|
||
}
|
||
|
||
// SuperPayoutAccountCreateForm 超管创建结算账户参数。
|
||
type SuperPayoutAccountCreateForm struct {
|
||
// UserID 收款账户归属用户ID。
|
||
UserID int64 `json:"user_id" validate:"required"`
|
||
// Type 账户类型(bank/alipay)。
|
||
Type string `json:"type" validate:"required,oneof=bank alipay"`
|
||
// Name 账户名称/开户行。
|
||
Name string `json:"name" validate:"required,max=128"`
|
||
// Account 收款账号。
|
||
Account string `json:"account" validate:"required,max=128"`
|
||
// Realname 收款人姓名。
|
||
Realname string `json:"realname" validate:"required,max=128"`
|
||
}
|
||
|
||
// SuperPayoutAccountUpdateForm 超管更新结算账户参数。
|
||
type SuperPayoutAccountUpdateForm struct {
|
||
// Type 账户类型(bank/alipay,可选)。
|
||
Type *string `json:"type" validate:"omitempty,oneof=bank alipay"`
|
||
// Name 账户名称/开户行(可选)。
|
||
Name *string `json:"name" validate:"omitempty,max=128"`
|
||
// Account 收款账号(可选)。
|
||
Account *string `json:"account" validate:"omitempty,max=128"`
|
||
// Realname 收款人姓名(可选)。
|
||
Realname *string `json:"realname" validate:"omitempty,max=128"`
|
||
}
|