收口审计治理与套餐任务进展
Constraint: 在线热修前必须保存当前迭代分支全部有效代码进展 Confidence: medium Scope-risk: broad Directive: 后续修改需保持审计事件与业务事务边界一致 Tested: git diff --cached --check Not-tested: 未运行全量测试,提交用于切换分支前保存既有工作
This commit is contained in:
27
internal/application/agentrecharge/recharge_audit.go
Normal file
27
internal/application/agentrecharge/recharge_audit.go
Normal file
@@ -0,0 +1,27 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user