fusenapi/model/gmodel/fs_order_gen.go
2023-09-19 19:17:04 +08:00

28 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package gmodel
import (
"gorm.io/gorm"
"time"
)
// fs_order 订单表
type FsOrder struct {
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"` // 物流类型
OrderSn *string `gorm:"unique_key;default:'';" json:"order_sn"` //
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"` //
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除0=否1=是
PayStatus *int64 `gorm:"default:0;" json:"pay_status"` // 支付状态
}
type FsOrderModel struct {
db *gorm.DB
name string
}
func NewFsOrderModel(db *gorm.DB) *FsOrderModel { return &FsOrderModel{db: db, name: "fs_order"} }