1234567891011121314151617181920212223242526272829303132333435363738 |
- // 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 TableNameOrder = "orders"
- // Order mapped from table <orders>
- type Order struct {
- ID int64 `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"`
- Platform int32 `gorm:"column:platform;type:smallint(6);not null;default:1" json:"platform"` // 订单平台(1:安卓,2:苹果)
- RelatID int32 `gorm:"column:relat_id;type:int(11);not null;uniqueIndex:relat_id,priority:1" json:"relat_id"` // 关联订单ID
- PaymentType int32 `gorm:"column:payment_type;type:smallint(6);not null;default:1" json:"payment_type"` // 支付方式(1:微信,2抖音 其他待定)
- PlayerID int64 `gorm:"column:player_id;type:bigint(20);not null;index:player_id,priority:1;uniqueIndex:relat_id,priority:2" json:"player_id"` // 玩家ID
- ServerID int32 `gorm:"column:server_id;type:int(11);not null;index:server_id,priority:1;default:1" json:"server_id"` // 服务器ID
- GoodsID int32 `gorm:"column:goods_id;type:int(11);not null" json:"goods_id"` // 商品ID
- OrderSn string `gorm:"column:order_sn;type:varchar(255);not null" json:"order_sn"` // 订单号
- OutTradeNo string `gorm:"column:out_trade_no;type:varchar(255)" json:"out_trade_no"` // 外部订单号
- Money float64 `gorm:"column:money;type:decimal(10,2);not null" json:"money"` // 订单实付金额
- IsNew int32 `gorm:"column:is_new;type:smallint(6);not null" json:"is_new"` // 是否为首次下单
- Status int32 `gorm:"column:status;type:int(11);not null" json:"status"` // 订单状态
- Date string `gorm:"column:date;type:date;not null;index:date,priority:1" json:"date"` // 订单日期
- PayAt time.Time `gorm:"column:pay_at;type:datetime" json:"pay_at"` // 支付时间
- CreatedAt time.Time `gorm:"column:created_at;type:datetime" json:"created_at"` // 创建时间
- ChannelID string `gorm:"column:channel_id;type:varchar(128);index:channel_id,priority:1;default:0" json:"channel_id"` // 渠道ID
- UserCreatedAt int32 `gorm:"column:user_created_at;type:int(11);index:user_created_at,priority:1" json:"user_created_at"` // 用户注册时间
- Flag int32 `gorm:"column:flag;type:int(11)" json:"flag"`
- }
- // TableName Order's table name
- func (*Order) TableName() string {
- return TableNameOrder
- }
|