feat(topup):基本完成商户充值记录的数据库操作部分。

This commit is contained in:
徐涛
2023-06-19 14:46:21 +08:00
parent 541932d62e
commit 234e811324
3 changed files with 217 additions and 0 deletions

22
model/top_up.go Normal file
View File

@@ -0,0 +1,22 @@
package model
import (
"electricity_bill_calc/types"
"github.com/shopspring/decimal"
)
type TopUp struct {
TopUpCode string `json:"topUpCode" db:"top_up_code"`
Park string `json:"parkId" db:"park_id"`
Tenement string `json:"tenementId" db:"tenement_id"`
TenementName string `json:"tenementName" db:"tenement_name"`
Meter string `json:"meterId" db:"meter_id"`
MeterAddress *string `json:"meterAddress" db:"meter_address"`
ToppedUpAt types.DateTime `json:"toppedUpAt" db:"topped_up_at"`
Amount decimal.Decimal `json:"amount" db:"amount"`
PaymentType int16 `json:"paymentType" db:"payment_type"`
SuccessfulSynchronized bool `json:"successfulSynchronized" db:"successful_synchronized"`
SynchronizedAt *types.DateTime `json:"synchronizedAt" db:"synchronized_at"`
CancelledAt *types.DateTime `json:"cancelledAt" db:"cancelled_at"`
}