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
|
|
|
|
|
|
|
2025-04-11 17:36:34 +08:00
|
|
|
|
import (
|
2025-05-10 16:59:41 +08:00
|
|
|
|
"platform/web/globals/orm"
|
2025-04-11 17:36:34 +08:00
|
|
|
|
|
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
|
|
)
|
2025-03-18 10:13:57 +08:00
|
|
|
|
|
|
|
|
|
|
const TableNameRefund = "refund"
|
|
|
|
|
|
|
|
|
|
|
|
// Refund mapped from table <refund>
|
|
|
|
|
|
type Refund struct {
|
2025-05-12 10:07:12 +08:00
|
|
|
|
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:退款ID" json:"id"` // 退款ID
|
|
|
|
|
|
TradeID int32 `gorm:"column:trade_id;not null;comment:订单ID" json:"trade_id"` // 订单ID
|
|
|
|
|
|
ProductID int32 `gorm:"column:product_id;comment:产品ID" json:"product_id"` // 产品ID
|
|
|
|
|
|
Amount float64 `gorm:"column:amount;not null;comment:退款金额" json:"amount"` // 退款金额
|
|
|
|
|
|
Reason string `gorm:"column:reason;comment:退款原因" json:"reason"` // 退款原因
|
|
|
|
|
|
Status int32 `gorm:"column:status;not null;comment:退款状态:0-待处理,1-已退款,2-已拒绝" json:"status"` // 退款状态:0-待处理,1-已退款,2-已拒绝
|
|
|
|
|
|
CreatedAt orm.LocalDateTime `gorm:"column:created_at;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
|
|
|
|
|
|
UpdatedAt orm.LocalDateTime `gorm:"column:updated_at;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
|
|
|
|
|
|
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:删除时间" json:"deleted_at"` // 删除时间
|
2025-03-18 10:13:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TableName Refund's table name
|
|
|
|
|
|
func (*Refund) TableName() string {
|
|
|
|
|
|
return TableNameRefund
|
|
|
|
|
|
}
|