fusenapi/model/gmodel/fs_order_gen.go

26 lines
1.1 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 (
2023-06-16 11:26:48 +00:00
"gorm.io/gorm"
2023-06-16 11:29:48 +00:00
"time"
2023-06-16 11:04:13 +00:00
)
2023-09-14 10:43:10 +00:00
// fs_order 订单表
2023-06-16 11:04:13 +00:00
type FsOrder struct {
2023-09-14 10:43:10 +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"` // 物流类型
OrderNo *string `gorm:"index;default:'';" json:"order_no"` //
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-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"} }