33 lines
1.0 KiB
Go
33 lines
1.0 KiB
Go
package model
|
|
|
|
import (
|
|
"electricity_bill_calc/types"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type UserChargeDetail struct {
|
|
Seq int64 `json:"seq"`
|
|
UserId string `json:"userId" db:"user_id"`
|
|
Name string `json:"name"`
|
|
Fee *float64 `json:"fee"`
|
|
Discount *float64 `json:"discount"`
|
|
Amount *float64 `json:"amount"`
|
|
ChargeTo types.Date `json:"chargeTo"`
|
|
Settled bool `json:"settled"`
|
|
SettledAt *types.DateTime `json:"settledAt"`
|
|
Cancelled bool `json:"cancelled"`
|
|
CancelledAt *types.DateTime `json:"cancelledAt"`
|
|
Refunded bool `json:"refunded"`
|
|
RefundedAt *types.DateTime `json:"refundedAt"`
|
|
CreatedAt types.DateTime `json:"createdAt"`
|
|
}
|
|
|
|
type ChargeRecordCreationForm struct {
|
|
UserId string `json:"userId"`
|
|
Fee decimal.NullDecimal `json:"fee"`
|
|
Discount decimal.NullDecimal `json:"discount"`
|
|
Amount decimal.NullDecimal `json:"amount"`
|
|
ChargeTo types.Date `json:"chargeTo"`
|
|
}
|