경매 관련 진행 준비

This commit is contained in:
2026-01-22 17:25:39 +00:00
parent de914a5d16
commit b5b761984e
17 changed files with 481 additions and 12 deletions
+51
View File
@@ -24,6 +24,19 @@ enum LogCategory {
USER
}
enum AuctionStatus {
OPEN
FINALIZING
FINISHED
CANCELED
}
enum AuctionType {
BUY_RICE
SELL_RICE
UNIQUE_ITEM
}
model WorldState {
id Int @id @default(autoincrement())
scenarioCode String @map("scenario_code")
@@ -246,6 +259,44 @@ model InheritanceResult {
@@map("inheritance_result")
}
model Auction {
id Int @id @default(autoincrement())
type AuctionType
targetCode String? @map("target_code")
hostGeneralId Int @map("host_general_id")
hostName String? @map("host_name")
detail Json @default(dbgenerated("'{}'::jsonb"))
status AuctionStatus @default(OPEN)
closeAt DateTime @map("close_at")
latestEventId String @default("") @map("latest_event_id")
latestEventAt DateTime @default(now()) @map("latest_event_at")
finalizingAt DateTime? @map("finalizing_at")
finishedAt DateTime? @map("finished_at")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
bids AuctionBid[]
@@index([status, closeAt])
@@map("auction")
}
model AuctionBid {
id Int @id @default(autoincrement())
auctionId Int @map("auction_id")
generalId Int @map("general_id")
amount Int
eventId String @map("event_id")
eventAt DateTime @map("event_at")
createdAt DateTime @default(now()) @map("created_at")
auction Auction @relation(fields: [auctionId], references: [id], onDelete: Cascade)
@@index([auctionId, amount])
@@index([auctionId, eventAt])
@@map("auction_bid")
}
model InheritanceUserState {
userId String @id @map("user_id")
meta Json @default(dbgenerated("'{}'::jsonb"))