支持提号完成后财务调整

This commit is contained in:
yml2213
2026-08-16 19:52:12 +08:00
parent 786d20e9cd
commit 80e55ba281
15 changed files with 1272 additions and 111 deletions
@@ -0,0 +1,23 @@
package model
import "time"
// AdminPickupFinancialAdjustment 保存已完成提号的财务调整,原始结算快照不可修改。
type AdminPickupFinancialAdjustment struct {
ID uint64 `gorm:"primaryKey" json:"id"`
PickupID uint64 `gorm:"not null;index" json:"pickup_id"`
ProfitDeltaCent int64 `gorm:"not null;default:0" json:"profit_delta_cent"`
SettleDeltaCent int64 `gorm:"not null;default:0" json:"settle_delta_cent"`
SettlementMode string `gorm:"size:32;not null" json:"settlement_mode"`
Status string `gorm:"size:24;not null;index" json:"status"`
Reason string `gorm:"size:255;not null" json:"reason"`
CreatedBy uint64 `gorm:"not null" json:"created_by"`
SettledBy *uint64 `json:"settled_by,omitempty"`
SettledAt *time.Time `json:"settled_at,omitempty"`
SettlementRemark string `gorm:"size:255;not null;default:''" json:"settlement_remark"`
CreatedAt time.Time `json:"created_at"`
}
func (AdminPickupFinancialAdjustment) TableName() string {
return "admin_pickup_financial_adjustments"
}