package agentrecharge import ( "context" "gorm.io/gorm" "github.com/break/junhong_cmp_fiber/internal/model" ) // RechargeAudit 描述代理充值申请或资金终态的实际变化。 type RechargeAudit struct { ActionCode string Summary string Record *model.AgentRechargeRecord Payment *model.Payment Approval *model.ApprovalInstance Wallet *model.AgentWallet Transaction *model.AgentWalletTransaction BeforeData map[string]any AfterData map[string]any } // RechargeAuditWriter 在代理充值业务事务内追加统一 Audit Event。 type RechargeAuditWriter interface { WriteAgentRecharge(ctx context.Context, tx *gorm.DB, change RechargeAudit) error }