fusenapi/model/gmodel/fs_order_gen.go
2023-09-27 11:30:17 +08:00

35 lines
2.0 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"` // 支付状态
StatusLink *[]byte `gorm:"default:'';" json:"status_link"` //
OrderProduct *[]byte `gorm:"default:'';" json:"order_product"` //
OrderAddress *[]byte `gorm:"default:'';" json:"order_address"` //
OrderAmount *[]byte `gorm:"default:'';" json:"order_amount"` //
PayStatusLink *[]byte `gorm:"default:'';" json:"pay_status_link"` //
ShoppingCartSnapshot *[]byte `gorm:"default:'';" json:"shopping_cart_snapshot"` //
ShoppingProductSnapshot *[]byte `gorm:"default:'';" json:"shopping_product_snapshot"` //
}
type FsOrderModel struct {
db *gorm.DB
name string
}
func NewFsOrderModel(db *gorm.DB) *FsOrderModel { return &FsOrderModel{db: db, name: "fs_order"} }