fix(admin,api,player): 返水注单去重、操作日志 i18n 与钱包紧凑金额
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -400,6 +400,7 @@ model Bet {
|
||||
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
selections BetSelection[]
|
||||
cashbackClaims CashbackBet[]
|
||||
|
||||
@@unique([userId, requestId])
|
||||
@@index([userId])
|
||||
@@ -508,6 +509,7 @@ model CashbackBatch {
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
items CashbackItem[]
|
||||
bets CashbackBet[]
|
||||
|
||||
@@map("cashback_batches")
|
||||
}
|
||||
@@ -529,6 +531,24 @@ model CashbackItem {
|
||||
@@map("cashback_items")
|
||||
}
|
||||
|
||||
/** 返水批次占用的注单(每笔注单全局仅能计入一次待发放/已发放批次) */
|
||||
model CashbackBet {
|
||||
id BigInt @id @default(autoincrement())
|
||||
batchId BigInt @map("batch_id")
|
||||
betId BigInt @unique @map("bet_id")
|
||||
userId BigInt @map("user_id")
|
||||
stake Decimal @db.Decimal(18, 4)
|
||||
amount Decimal @db.Decimal(18, 4)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
batch CashbackBatch @relation(fields: [batchId], references: [id], onDelete: Cascade)
|
||||
bet Bet @relation(fields: [betId], references: [id])
|
||||
|
||||
@@index([batchId])
|
||||
@@index([userId])
|
||||
@@map("cashback_bets")
|
||||
}
|
||||
|
||||
// ============ Content & i18n ============
|
||||
|
||||
model Content {
|
||||
|
||||
Reference in New Issue
Block a user