feat: 充值订单审计与重新申请,优化赛事展示和余额刷新
- 新增 deposit_order_audit_logs 表,记录提交/审批/拒绝/撤销/重提全链路 - 管理端充值单页增加审计历史;玩家端充值历史支持时间线与重新申请 - 已拒绝订单可原单号重提;撤销入账使用 PLAYER_DEPOSIT_REVERSAL 并加强幂等 - 结算后清除热门标记,允许归档已结算赛事,完善今日赛事时区窗口 - 足球页今日/早盘独立折叠;资料与余额在进入钱包/个人页及下注后自动刷新 - 补充投注玩法、结算返水规则文档;新增 smoke/settlement CLI 脚本 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -785,6 +785,7 @@ model DepositOrder {
|
||||
|
||||
player User @relation("PlayerDepositOrders", fields: [playerId], references: [id])
|
||||
paymentMethod PaymentMethod @relation(fields: [paymentMethodId], references: [id])
|
||||
auditLogs DepositOrderAuditLog[]
|
||||
|
||||
@@index([playerId])
|
||||
@@index([status])
|
||||
@@ -792,6 +793,26 @@ model DepositOrder {
|
||||
@@map("deposit_orders")
|
||||
}
|
||||
|
||||
model DepositOrderAuditLog {
|
||||
id BigInt @id @default(autoincrement())
|
||||
depositOrderId BigInt @map("deposit_order_id")
|
||||
action String @db.VarChar(32)
|
||||
actorId BigInt? @map("actor_id")
|
||||
actorType String @map("actor_type") @db.VarChar(20)
|
||||
statusBefore String? @map("status_before") @db.VarChar(20)
|
||||
statusAfter String @map("status_after") @db.VarChar(20)
|
||||
amount Decimal? @db.Decimal(18, 4)
|
||||
approvedAmount Decimal? @map("approved_amount") @db.Decimal(18, 4)
|
||||
remark String? @db.VarChar(500)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
depositOrder DepositOrder @relation(fields: [depositOrderId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([depositOrderId])
|
||||
@@index([createdAt])
|
||||
@@map("deposit_order_audit_logs")
|
||||
}
|
||||
|
||||
// ============ System Config & Audit ============
|
||||
|
||||
model SystemConfig {
|
||||
|
||||
Reference in New Issue
Block a user