refactor: align framework cleanup with new bootstrap flow

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
2025-11-19 12:47:25 +08:00
parent 39d14ec093
commit d66323487b
67 changed files with 3020 additions and 3992 deletions

View File

@@ -1,30 +0,0 @@
package model
import (
"time"
)
// Order 订单实体
type Order struct {
BaseModel
// 业务唯一键
OrderID string `gorm:"uniqueIndex:uk_order_order_id;not null;size:50" json:"order_id"`
// 关联关系 (仅存储 ID,不使用 GORM 关联)
UserID uint `gorm:"not null;index:idx_order_user_id" json:"user_id"`
// 订单信息
Amount int64 `gorm:"not null" json:"amount"` // 金额(分)
Status string `gorm:"not null;size:20;default:'pending';index:idx_order_status" json:"status"`
Remark string `gorm:"size:500" json:"remark,omitempty"`
// 时间字段
PaidAt *time.Time `gorm:"column:paid_at" json:"paid_at,omitempty"`
CompletedAt *time.Time `gorm:"column:completed_at" json:"completed_at,omitempty"`
}
// TableName 指定表名
func (Order) TableName() string {
return "tb_order"
}