feat: 手动充值、邀请码注册与后台管理增强

新增玩家手动充值全流程(收款方式配置、充值下单/审核、钱包上分),
支持邀请码注册、邀请历史与专属返水率;完善后台代理/玩家管理与响应式操作栏,
并补充前台注册、充值页及多语言错误码。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-11 12:20:11 +08:00
parent 618fb49511
commit 10485ecfaf
98 changed files with 7908 additions and 856 deletions

View File

@@ -17,9 +17,12 @@ model User {
parentId BigInt? @map("parent_id")
agentLevel Int? @map("agent_level")
locale String @default("en-US") @db.VarChar(10)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
inviteCode String? @unique @map("invite_code") @db.VarChar(16)
inviteSponsorId BigInt? @map("invite_sponsor_id")
usedInviteId BigInt? @map("used_invite_id")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
auth UserAuth?
wallet Wallet?
@@ -27,15 +30,41 @@ model User {
adminRole AdminUserRole?
bets Bet[]
preferences UserPreference?
depositOrders DepositOrder[] @relation("PlayerDepositOrders")
parent User? @relation("UserHierarchy", fields: [parentId], references: [id])
children User[] @relation("UserHierarchy")
parent User? @relation("UserHierarchy", fields: [parentId], references: [id])
children User[] @relation("UserHierarchy")
inviteSponsor User? @relation("InviteSponsor", fields: [inviteSponsorId], references: [id])
invitedPlayers User[] @relation("InviteSponsor")
usedInvite UserInvite? @relation("UsedInvite", fields: [usedInviteId], references: [id])
invites UserInvite[] @relation("UserInvites")
@@index([userType])
@@index([parentId])
@@index([inviteSponsorId])
@@index([usedInviteId])
@@map("users")
}
model UserInvite {
id BigInt @id @default(autoincrement())
code String @unique @db.VarChar(16)
sponsorId BigInt @map("sponsor_id")
status String @default("ACTIVE") @db.VarChar(20)
registerCount Int @default(0) @map("register_count")
createdAt DateTime @default(now()) @map("created_at")
revokedAt DateTime? @map("revoked_at")
cashbackRate Decimal? @map("cashback_rate") @db.Decimal(8, 4)
sponsor User @relation("UserInvites", fields: [sponsorId], references: [id])
registrations User[] @relation("UsedInvite")
@@index([sponsorId])
@@index([status])
@@index([createdAt])
@@map("user_invites")
}
model UserAuth {
id BigInt @id @default(autoincrement())
userId BigInt @unique @map("user_id")
@@ -613,6 +642,56 @@ model UploadedFile {
@@map("uploaded_files")
}
// ============ Manual Deposit / Recharge ============
model PaymentMethod {
id BigInt @id @default(autoincrement())
methodType String @map("method_type") @db.VarChar(20)
bankName String? @map("bank_name") @db.VarChar(128)
accountHolder String? @map("account_holder") @db.VarChar(128)
accountNumber String? @map("account_number") @db.VarChar(128)
usdtAddress String? @map("usdt_address") @db.VarChar(256)
qrCodeUrl String? @map("qr_code_url") @db.VarChar(500)
displayName String? @map("display_name") @db.VarChar(128)
sortOrder Int @default(0) @map("sort_order")
isActive Boolean @default(true) @map("is_active")
showOnPlayer Boolean @default(true) @map("show_on_player")
createdBy BigInt? @map("created_by")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
depositOrders DepositOrder[]
@@index([methodType, isActive])
@@map("payment_methods")
}
model DepositOrder {
id BigInt @id @default(autoincrement())
orderNo String @unique @map("order_no") @db.VarChar(64)
playerId BigInt @map("player_id")
paymentMethodId BigInt @map("payment_method_id")
methodType String @map("method_type") @db.VarChar(20)
amount Decimal @db.Decimal(18, 4)
screenshotUrl String @map("screenshot_url") @db.VarChar(500)
status String @default("PENDING") @db.VarChar(20)
approvedAmount Decimal? @map("approved_amount") @db.Decimal(18, 4)
reviewerId BigInt? @map("reviewer_id")
reviewedAt DateTime? @map("reviewed_at")
rejectReason String? @map("reject_reason") @db.VarChar(500)
remark String? @db.VarChar(500)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
player User @relation("PlayerDepositOrders", fields: [playerId], references: [id])
paymentMethod PaymentMethod @relation(fields: [paymentMethodId], references: [id])
@@index([playerId])
@@index([status])
@@index([createdAt])
@@map("deposit_orders")
}
// ============ System Config & Audit ============
model SystemConfig {