2023-06-19 01:53:35 +00:00
|
|
|
|
package gmodel
|
2023-06-16 11:04:13 +00:00
|
|
|
|
|
|
|
|
|
import (
|
2023-09-16 12:15:24 +00:00
|
|
|
|
"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-27 09:23:58 +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"` // 物流类型
|
|
|
|
|
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"` //
|
2023-06-16 11:04:13 +00:00
|
|
|
|
}
|
2023-07-20 02:13:18 +00:00
|
|
|
|
type FsOrderModel struct {
|
|
|
|
|
db *gorm.DB
|
|
|
|
|
name string
|
|
|
|
|
}
|
2023-06-16 11:04:13 +00:00
|
|
|
|
|
2023-07-20 02:13:18 +00:00
|
|
|
|
func NewFsOrderModel(db *gorm.DB) *FsOrderModel { return &FsOrderModel{db: db, name: "fs_order"} }
|