feat(charge):基本完成用户充值管理部分接口。

This commit is contained in:
徐涛
2023-06-03 11:26:36 +08:00
parent f8ef6aba98
commit 98f3bdec0a
7 changed files with 434 additions and 4 deletions

30
model/charge.go Normal file
View File

@@ -0,0 +1,30 @@
package model
import (
"time"
"github.com/shopspring/decimal"
)
type UserChargeDetail struct {
Seq int64 `json:"seq"`
UserId string `json:"user_id"`
Name string `json:"name"`
Fee *decimal.Decimal `json:"fee"`
Discount *decimal.Decimal `json:"discount"`
Amount *decimal.Decimal `json:"amount"`
ChargeTo Date `json:"charge_to"`
Settled bool `json:"settled"`
SettledAt *time.Time `json:"settled_at"`
Cancelled bool `json:"cancelled"`
CancelledAt *time.Time `json:"cancelled_at"`
CreatedAt time.Time `json:"created_at"`
}
type ChargeRecordCreationForm struct {
UserId string `json:"userId"`
Fee *decimal.Decimal `json:"fee"`
Discount *decimal.Decimal `json:"discount"`
Amount *decimal.Decimal `json:"amount"`
ChargeTo Date `json:"chargeTo"`
}