29 lines
1.6 KiB
Go
29 lines
1.6 KiB
Go
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||
|
||
package model
|
||
|
||
import (
|
||
"time"
|
||
)
|
||
|
||
const TableNameOrderSnapshots = "order_snapshots"
|
||
|
||
// OrderSnapshots 订单快照表
|
||
type OrderSnapshots struct {
|
||
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
|
||
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP(3);comment:创建时间" json:"created_at"` // 创建时间
|
||
OrderID int64 `gorm:"column:order_id;not null;comment:订单ID" json:"order_id"` // 订单ID
|
||
OrderNo string `gorm:"column:order_no;not null;comment:订单号" json:"order_no"` // 订单号
|
||
UserID int64 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` // 用户ID
|
||
SnapshotType int32 `gorm:"column:snapshot_type;not null;comment:快照类型:1=消费前 2=消费后" json:"snapshot_type"` // 快照类型:1=消费前 2=消费后
|
||
SnapshotData string `gorm:"column:snapshot_data;not null;comment:完整状态快照(JSON)" json:"snapshot_data"` // 完整状态快照(JSON)
|
||
SnapshotHash string `gorm:"column:snapshot_hash;comment:快照数据Hash(可选,用于校验)" json:"snapshot_hash"` // 快照数据Hash(可选,用于校验)
|
||
}
|
||
|
||
// TableName OrderSnapshots's table name
|
||
func (*OrderSnapshots) TableName() string {
|
||
return TableNameOrderSnapshots
|
||
}
|