feat(charge):基本完成所有用户服务延期记录部分的功能,待测。

This commit is contained in:
徐涛
2022-08-15 15:40:33 +08:00
parent 68c34f540f
commit f033691aa4
5 changed files with 232 additions and 11 deletions

View File

@@ -7,16 +7,19 @@ import (
)
type UserCharge struct {
Created `xorm:"extends"`
Seq int64 `xorm:"bigint pk not null " json:"seq"`
UserId string `xorm:"varchar(120) not null" json:"userId"`
Fee decimal.Decimal `xorm:"numeric(12,2) not null" json:"fee"`
Discount decimal.Decimal `xorm:"numeric(5,4) not null" json:"discount"`
Amount decimal.Decimal `xorm:"numeric(12,2) not null" json:"amount"`
Settled bool `xorm:"bool not null default false" json:"settled"`
SettledAt *time.Time `xorm:"timestampz" json:"settledAt" time_format:"simple_datetime" time_location:"shanghai"`
Refunded bool `xorm:"bool not null default false" json:"refunded"`
RefundedAt *time.Time `xorm:"timestampz" json:"refundedAt" time_format:"simple_datetime" time_location:"shanghai"`
Created `xorm:"extends"`
Seq int64 `xorm:"bigint pk not null autoincr" json:"seq"`
UserId string `xorm:"varchar(120) not null" json:"userId"`
Fee decimal.NullDecimal `xorm:"numeric(12,2)" json:"fee"`
Discount decimal.NullDecimal `xorm:"numeric(5,4)" json:"discount"`
Amount decimal.NullDecimal `xorm:"numeric(12,2)" json:"amount"`
ChargeTo time.Time `xorm:"date not null" json:"chargeTo" time_format:"simple_date" time_location:"shanghai"`
Settled bool `xorm:"bool not null default false" json:"settled"`
SettledAt *time.Time `xorm:"timestampz" json:"settledAt" time_format:"simple_datetime" time_location:"shanghai"`
Cancelled bool `xorm:"bool not null default false" json:"cancelled"`
CancelledAt *time.Time `xorm:"timestampz" json:"cancelledAt" time_format:"simple_datetime" time_location:"shanghai"`
Refunded bool `xorm:"bool not null default false" json:"refunded"`
RefundedAt *time.Time `xorm:"timestampz" json:"refundedAt" time_format:"simple_datetime" time_location:"shanghai"`
}
func (UserCharge) TableName() string {