This commit is contained in:
苏尹岚
2020-10-13 09:36:51 +08:00
parent 1affa3afbb
commit c9263befb3
2 changed files with 21 additions and 0 deletions

View File

@@ -442,3 +442,22 @@ func IsOrderJXTemp(order *GoodsOrder) bool {
func IsAfsOrderJXTemp(order *AfsOrder) bool {
return order.VendorID == VendorIDJX && order.Flag&OrderFlagMaskTempJX != 0
}
type Order struct {
ModelIDCUL
OrderID int64 `orm:"column(order_id)" json:"orderID"` //订单号
UserID string `orm:"column(user_id);size(48)" json:"userID"` //用户ID
Type int `json:"type"` //订单类型
Status int `json:"status"` //订单状态
PayPrice int `json:"payPrice"` //支付金额
Comment string `orm:"size(255)" json:"comment"` //备注
}
func (v *Order) TableIndex() [][]string {
return [][]string{
[]string{"CreatedAt"},
[]string{"OrderID"},
[]string{"UserID"},
}
}

View File

@@ -14,6 +14,8 @@ func Init() {
orm.RegisterModel(&model.AuthBind{}, &model.User{})
//账单
orm.RegisterModel(&model.UserBill{}, &model.BillIncome{}, &model.BillExpend{})
//支付订单
orm.RegisterModel(&model.Order{})
orm.RegisterModel(&model.NewConfig{})
// create table