移除履约任务表

This commit is contained in:
yml2213
2026-07-31 00:03:29 +08:00
parent ee956e2e01
commit fe71276e62
5 changed files with 5 additions and 75 deletions
-22
View File
@@ -45,11 +45,6 @@ const (
FulfillmentStatusFailed = "failed"
FulfillmentStatusCancelled = "cancelled"
FulfillmentJobStatusPending = "pending"
FulfillmentJobStatusProcessing = "processing"
FulfillmentJobStatusSucceeded = "succeeded"
FulfillmentJobStatusFailed = "failed"
WalletLedgerCredit = "credit"
WalletLedgerDebit = "debit"
WalletLedgerRefund = "refund"
@@ -228,23 +223,6 @@ type FulfillmentOrder struct {
MerchantProduct *MerchantProduct `gorm:"foreignKey:MerchantProductID" json:"merchant_product,omitempty"`
}
// FulfillmentJob 为后续履约器保留可重试的持久化任务边界。
type FulfillmentJob struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
MerchantID uint `gorm:"not null;index" json:"merchant_id"`
OrderID uint `gorm:"not null;uniqueIndex" json:"order_id"`
Status string `gorm:"size:16;not null;default:pending;index" json:"status"`
Attempts int `gorm:"not null;default:0" json:"attempts"`
NextRunAt time.Time `gorm:"not null;index" json:"next_run_at"`
ProviderOrderNo string `gorm:"size:96;index" json:"provider_order_no"`
RequestPayload string `gorm:"type:text" json:"request_payload"`
ResultPayload string `gorm:"type:text" json:"result_payload"`
LastError string `gorm:"size:512" json:"last_error"`
}
// CallbackSubscription 为商户提供独立、可禁用的事件订阅。
type CallbackSubscription struct {
ID uint `gorm:"primarykey" json:"id"`