45 lines
1.9 KiB
Go
45 lines
1.9 KiB
Go
package dto
|
||
|
||
// QuotaInfoGetBySelfRequest 我的额度
|
||
type QuotaInfoGetBySelfRequest struct{}
|
||
|
||
// QuotaInfoGetBySelfResponse 我的额度
|
||
type QuotaInfoGetBySelfResponse struct {
|
||
Quotas []QuotaItemResponse `json:"quotas"`
|
||
}
|
||
|
||
// QuotaItemResponse 单项额度。
|
||
// Cos(quota_type=1):Total=永久总额度、Used=永久累计已用、Remain=永久剩余;
|
||
// AI/社区/衣柜(2/3/4):Total=每日总额度、Used=当日已用、Remain=当日剩余(次日 0 点重置)。
|
||
type QuotaItemResponse struct {
|
||
QuotaType int8 `json:"quota_type"` // 1=cos上传 2=AI 3=社区分享 4=衣柜分享
|
||
Total int64 `json:"total"` // 总额度(Cos 永久 / 每日额度)
|
||
Used int64 `json:"used"` // 已用(Cos 永久累计 / 当日已用)
|
||
Remain int64 `json:"remain"` // 剩余
|
||
}
|
||
|
||
// QuotaFlowListRequest 额度流水查询
|
||
type QuotaFlowListRequest struct {
|
||
PageRequest
|
||
QuotaType int8 `form:"quota_type" binding:"omitempty,oneof=1 2 3 4"` // 不传=全部
|
||
}
|
||
|
||
// QuotaFlowItemResponse 额度流水明细
|
||
type QuotaFlowItemResponse struct {
|
||
QuotaFlowUUID string `json:"quota_flow_uuid"` // 配额流水UUID
|
||
QuotaType int8 `json:"quota_type"` // 1=cos上传 2=AI 3=社区分享 4=衣柜分享
|
||
ChangeTarget int8 `json:"change_target"` // 1=配额调整 2=使用
|
||
ChangeType int8 `json:"change_type"` // 1=购买获赠 2=活动赠送 3=上传消耗 4=删除回退 5=人工调整
|
||
ChangeNum int64 `json:"change_num"` // 变更数量(正增负减)
|
||
NewValue int64 `json:"new_value"` // 变更后数值
|
||
Reason string `json:"reason"` // 变更原因/备注
|
||
OrderNo string `json:"order_no"` // 关联订单号(购买类)
|
||
CreatedAt int64 `json:"created_at"`
|
||
}
|
||
|
||
// QuotaFlowListResponse 额度流水列表
|
||
type QuotaFlowListResponse struct {
|
||
PageResponse
|
||
List []QuotaFlowItemResponse `json:"list"`
|
||
}
|