goProject/trunk/center/paycenter/internal/pay/order.go

35 lines
994 B
Go
Raw Normal View History

2025-01-08 17:48:14 +08:00
package pay
import (
"common/connection"
"time"
)
func init() {
//注册数据库
connection.RegisterDBModel(&Order{})
}
type Order struct {
//订单id
OrderID int64 `gorm:"column:order_id;primary_key;comment:订单id" json:"order_id"`
//订单日期
OrderDate time.Time `gorm:"column:order_date;comment:订单日期" json:"order_date"`
//订单号
PrepayId string `gorm:"column:prepay_id;comment:预支付交易会话标识" json:"prepay_id"`
//订单金额
OrderMoney int64 `gorm:"column:order_money;comment:订单金额" json:"order_money"`
//订单状态
OrderStatus int32 `gorm:"column:order_status;comment:订单状态" json:"order_status"`
//用户id
UserID string `gorm:"column:user_id;comment:用户id" json:"user_id"`
//区服id
ServerID int64 `gorm:"column:server_id;comment:区服id" json:"server_id"`
//玩家标识
PlayerID string `gorm:"column:player_id;comment:玩家标识" json:"player_id"`
}
func (order *Order) TableName() string {
return "order"
}