refactor platform domain states and permissions

This commit is contained in:
david
2026-07-29 14:25:38 +08:00
parent d4799cd320
commit 35a52c4b06
42 changed files with 507 additions and 364 deletions

View File

@@ -7,11 +7,12 @@ import (
// FinPayment 对应 fin_payment保存支付与退款记录。
type FinPayment struct {
Entity // 公共实体字段
EcOrderID uint64 `gorm:"column:ec_order_id;not null;index" json:"ec_order_id"` // ec_order_id 业务字段
Channel string `gorm:"column:channel;type:varchar(32);not null" json:"channel"` // channel 业务字段
Amount int64 `gorm:"column:amount;not null;default:0;check:amount > 0" json:"amount"` // amount 业务字段
PaidAt *time.Time `gorm:"column:paid_at;type:timestamptz" json:"paid_at"` // paid_at 业务字段
Entity // 公共实体字段
PaymentStatus int `gorm:"column:payment_status;not null;default:10;index" json:"payment_status"` // 支付业务状态
EcOrderID uint64 `gorm:"column:ec_order_id;not null;index" json:"ec_order_id"` // ec_order_id 业务字段
Channel string `gorm:"column:channel;type:varchar(32);not null" json:"channel"` // channel 业务字段
Amount int64 `gorm:"column:amount;not null;default:0;check:amount > 0" json:"amount"` // amount 业务字段
PaidAt *time.Time `gorm:"column:paid_at;type:timestamptz" json:"paid_at"` // paid_at 业务字段
}
func init() { database.AppendMigrate(&FinPayment{}) }