package v1

import (
	"kami/api/commonApi"

	"github.com/gogf/gf/v2/frame/g"
	"github.com/shopspring/decimal"
)

// PaymentSummaryListReq 以日为单位统计用户账单数据
type PaymentSummaryListReq struct {
	g.Meta   `path:"/sysUser/paymentSummary/list" tags:"用户充值统计" method:"get" summary:"用户流水按日汇总"`
	Username string `p:"username"`
	Date     string `p:"date"`
	commonApi.CommonPageReq
}

type PaymentSummaryRecord struct {
	Username                 string          `json:"username" orm:"username"`
	TotalDepositAmount       decimal.Decimal `json:"totalDepositAmount" orm:"total_deposit_amount"`
	TotalConsumeAmount       decimal.Decimal `json:"totalConsumeAmount" orm:"total_consume_amount"`
	TotalReturnAmount        decimal.Decimal `json:"totalReturnAmount" orm:"total_return_amount"`
	TotalActualConsumeAmount decimal.Decimal `json:"totalActualConsumeAmount" orm:"total_actual_consume_amount"`
	TotalManualHandleAmount  decimal.Decimal `json:"totalManualHandleAmount" orm:"total_manual_handle_amount"`
	CreatedAt                string          `json:"createdAt" orm:"create_at"`
}

type PaymentSummaryListRes struct {
	commonApi.CommonPageRes[*PaymentSummaryRecord]
}
