26 lines
1.1 KiB
Go
26 lines
1.1 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// PrintBillRecord 打印机充值/小费记录
|
|
type PrintBillRecord struct {
|
|
ID int `orm:"column(id)" json:"id" db:"id"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
|
PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号
|
|
PayType int `orm:"type(int);size(2)" json:"pay_type" db:"pay_type"` // 支付类型[1-充值/2-支出]
|
|
PayMoney int `orm:"type(int);size(10)" json:"pay_money" db:"pay_money"` // 金额
|
|
OrderId string `orm:"column(order_id);type(varchar);size(64);index" json:"order_id" db:"order_id"` // 订单号
|
|
UserId string `orm:"column(user_id);type(varchar);size(125)" json:"user_id" db:"user_id"` // 打印机所属用户
|
|
}
|
|
|
|
func (v *PrintBillRecord) TableUnique() [][]string {
|
|
return [][]string{}
|
|
}
|
|
|
|
func (v *PrintBillRecord) TableIndex() [][]string {
|
|
return [][]string{
|
|
[]string{"PrintNo"},
|
|
}
|
|
}
|