2025-03-18 10:13:57 +08:00
|
|
|
|
// 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 models
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2025-04-10 17:49:11 +08:00
|
|
|
|
"platform/web/common"
|
2025-03-18 10:13:57 +08:00
|
|
|
|
"time"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const TableNameTrade = "trade"
|
|
|
|
|
|
|
|
|
|
|
|
// Trade mapped from table <trade>
|
|
|
|
|
|
type Trade struct {
|
2025-04-10 17:49:11 +08:00
|
|
|
|
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:订单ID" json:"id"` // 订单ID
|
|
|
|
|
|
UserID int32 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` // 用户ID
|
|
|
|
|
|
InnerNo string `gorm:"column:inner_no;not null;comment:内部订单号" json:"inner_no"` // 内部订单号
|
|
|
|
|
|
OuterNo string `gorm:"column:outer_no;comment:外部订单号" json:"outer_no"` // 外部订单号
|
|
|
|
|
|
Subject string `gorm:"column:subject;not null;comment:订单主题" json:"subject"` // 订单主题
|
|
|
|
|
|
Remark string `gorm:"column:remark;comment:订单备注" json:"remark"` // 订单备注
|
|
|
|
|
|
Amount float64 `gorm:"column:amount;not null;comment:订单总金额" json:"amount"` // 订单总金额
|
|
|
|
|
|
Payment float64 `gorm:"column:payment;not null;comment:支付金额" json:"payment"` // 支付金额
|
|
|
|
|
|
Method int32 `gorm:"column:method;not null;comment:支付方式:1-支付宝,2-微信" json:"method"` // 支付方式:1-支付宝,2-微信
|
|
|
|
|
|
Status int32 `gorm:"column:status;not null;comment:订单状态:0-待支付,1-已支付,2-已取消,3-已退款" json:"status"` // 订单状态:0-待支付,1-已支付,2-已取消,3-已退款
|
|
|
|
|
|
CreatedAt common.LocalDateTime `gorm:"column:created_at;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
|
|
|
|
|
|
UpdatedAt common.LocalDateTime `gorm:"column:updated_at;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
|
|
|
|
|
|
DeletedAt common.LocalDateTime `gorm:"column:deleted_at;comment:删除时间" json:"deleted_at"` // 删除时间
|
|
|
|
|
|
Type int32 `gorm:"column:type;not null" json:"type"`
|
|
|
|
|
|
CancelAt time.Time `gorm:"column:cancel_at" json:"cancel_at"`
|
|
|
|
|
|
PaidAt time.Time `gorm:"column:paid_at" json:"paid_at"`
|
2025-03-18 10:13:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TableName Trade's table name
|
|
|
|
|
|
func (*Trade) TableName() string {
|
|
|
|
|
|
return TableNameTrade
|
|
|
|
|
|
}
|