110 lines
3.0 KiB
Go
110 lines
3.0 KiB
Go
package dto
|
||
|
||
import "quyun/v2/pkg/consts"
|
||
|
||
type UserUpdate struct {
|
||
// Nickname 昵称。
|
||
Nickname string `json:"nickname"`
|
||
// Avatar 头像URL。
|
||
Avatar string `json:"avatar"`
|
||
// Gender 性别(枚举)。
|
||
Gender consts.Gender `json:"gender"`
|
||
// Bio 个人简介。
|
||
Bio string `json:"bio"`
|
||
// Birthday 生日(YYYY-MM-DD)。
|
||
Birthday string `json:"birthday"`
|
||
// Location 地区信息(省/市)。
|
||
Location *Location `json:"location"`
|
||
}
|
||
|
||
type RealNameForm struct {
|
||
// Realname 真实姓名。
|
||
Realname string `json:"realname"`
|
||
// IDCard 身份证号。
|
||
IDCard string `json:"id_card"`
|
||
}
|
||
|
||
type WalletResponse struct {
|
||
// Balance 账户余额(单位元)。
|
||
Balance float64 `json:"balance"`
|
||
// Transactions 交易流水列表。
|
||
Transactions []Transaction `json:"transactions"`
|
||
}
|
||
|
||
type Transaction struct {
|
||
// ID 流水ID。
|
||
ID int64 `json:"id"`
|
||
// Title 流水标题/描述。
|
||
Title string `json:"title"`
|
||
// Amount 发生金额(单位元)。
|
||
Amount float64 `json:"amount"`
|
||
// Type 流水类型(income/expense)。
|
||
Type string `json:"type"`
|
||
// Date 发生时间(RFC3339)。
|
||
Date string `json:"date"`
|
||
}
|
||
|
||
type RechargeForm struct {
|
||
// Code 充值码字符串(用于兑换余额)。
|
||
Code string `json:"code"`
|
||
}
|
||
|
||
type RechargeResponse struct {
|
||
// OrderID 充值订单ID。
|
||
OrderID int64 `json:"order_id"`
|
||
// Amount 充值金额(单位元)。
|
||
Amount float64 `json:"amount"`
|
||
}
|
||
|
||
type Order struct {
|
||
// ID 订单ID。
|
||
ID int64 `json:"id"`
|
||
// Type 订单类型(内容购买/充值等)。
|
||
Type string `json:"type"`
|
||
// TypeDescription 订单类型描述。
|
||
TypeDescription string `json:"type_description"`
|
||
// CreateTime 创建时间(RFC3339)。
|
||
CreateTime string `json:"create_time"`
|
||
// PayTime 支付时间(RFC3339)。
|
||
PayTime string `json:"pay_time"`
|
||
// Status 订单状态。
|
||
Status string `json:"status"`
|
||
// StatusDescription 订单状态描述。
|
||
StatusDescription string `json:"status_description"`
|
||
// Amount 实付金额(单位元)。
|
||
Amount float64 `json:"amount"`
|
||
// Quantity 内容数量。
|
||
Quantity int `json:"quantity"`
|
||
// Items 订单内容明细。
|
||
Items []ContentItem `json:"items"`
|
||
// TenantID 内容所属租户ID。
|
||
TenantID int64 `json:"tenant_id"`
|
||
// TenantName 租户名称。
|
||
TenantName string `json:"tenant_name"`
|
||
// IsVirtual 是否虚拟订单。
|
||
IsVirtual bool `json:"is_virtual"`
|
||
// BuyerName 买家昵称。
|
||
BuyerName string `json:"buyer_name"`
|
||
// BuyerAvatar 买家头像URL。
|
||
BuyerAvatar string `json:"buyer_avatar"`
|
||
// Title 订单标题(用于列表展示)。
|
||
Title string `json:"title"`
|
||
// Cover 订单封面图。
|
||
Cover string `json:"cover"`
|
||
}
|
||
|
||
type Notification struct {
|
||
// ID 通知ID。
|
||
ID int64 `json:"id"`
|
||
// Type 通知类型(system/order/interaction)。
|
||
Type string `json:"type"`
|
||
// Title 通知标题。
|
||
Title string `json:"title"`
|
||
// Content 通知内容。
|
||
Content string `json:"content"`
|
||
// Read 是否已读。
|
||
Read bool `json:"read"`
|
||
// Time 发送时间(RFC3339)。
|
||
Time string `json:"time"`
|
||
}
|