fusenapi/model/gmodel/fs_order_gen.go

28 lines
1.3 KiB
Go
Raw Normal View History

2023-06-19 01:53:35 +00:00
package gmodel
2023-06-16 11:04:13 +00:00
import (
"gorm.io/gorm"
2023-09-19 11:17:04 +00:00
"time"
2023-06-16 11:04:13 +00:00
)
2023-09-15 03:20:49 +00:00
// fs_order 订单表
2023-06-16 11:04:13 +00:00
type FsOrder struct {
2023-09-15 03:20:49 +00:00
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 订单ID
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
DeliveryMethod *int64 `gorm:"index;default:0;" json:"delivery_method"` // 物流类型
2023-09-19 11:17:04 +00:00
OrderSn *string `gorm:"unique_key;default:'';" json:"order_sn"` //
2023-09-15 03:20:49 +00:00
OrderSource *string `gorm:"default:'';" json:"order_source"` //
Status *int64 `gorm:"index;default:0;" json:"status"` // 订单状态
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
2023-09-15 09:58:45 +00:00
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除0=否1=是
2023-09-19 11:17:04 +00:00
PayStatus *int64 `gorm:"default:0;" json:"pay_status"` // 支付状态
2023-06-16 11:04:13 +00:00
}
type FsOrderModel struct {
db *gorm.DB
name string
}
2023-06-16 11:04:13 +00:00
func NewFsOrderModel(db *gorm.DB) *FsOrderModel { return &FsOrderModel{db: db, name: "fs_order"} }