order
This commit is contained in:
@@ -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"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user