package model import ( "time" "github.com/shopspring/decimal" ) type UserCharge struct { Created `xorm:"extends"` Seq int64 `xorm:"bigint pk notnull " json:"seq"` CreatedAt time.Time `xorm:"timestampz notnull" json:"createdAt"` UserId string `xorm:"varchar(120) notnull" json:"userId"` Fee decimal.Decimal `xorm:"decimal(12,2) notnull" json:"fee"` Discount decimal.Decimal `xorm:"decimal(5,4) notnull" json:"discount"` Amount decimal.Decimal `xorm:"decimal(12,2) notnull" json:"amount"` Settled bool `xorm:"bool notnull" json:"settled"` SettledAt *time.Time `xorm:"timestampz" json:"settledAt"` } func (UserCharge) TableName() string { return "user_charge" }