feat: port scenario 903 select-pool flow
This commit is contained in:
@@ -198,6 +198,19 @@ model General {
|
||||
@@map("general")
|
||||
}
|
||||
|
||||
model SelectPoolEntry {
|
||||
id Int @id @default(autoincrement())
|
||||
uniqueName String @unique @map("unique_name") @db.VarChar(20)
|
||||
ownerUserId String? @map("owner_user_id")
|
||||
generalId Int? @unique @map("general_id")
|
||||
reservedUntil DateTime? @map("reserved_until")
|
||||
info Json
|
||||
|
||||
@@index([ownerUserId])
|
||||
@@index([reservedUntil, generalId])
|
||||
@@map("select_pool")
|
||||
}
|
||||
|
||||
model GeneralAccessLog {
|
||||
id Int @id @default(autoincrement())
|
||||
generalId Int @unique @map("general_id")
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
CREATE TABLE "select_pool" (
|
||||
"id" SERIAL PRIMARY KEY,
|
||||
"unique_name" VARCHAR(20) NOT NULL,
|
||||
"owner_user_id" TEXT,
|
||||
"general_id" INTEGER,
|
||||
"reserved_until" TIMESTAMP(3),
|
||||
"info" JSONB NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "select_pool_unique_name_key"
|
||||
ON "select_pool"("unique_name");
|
||||
CREATE UNIQUE INDEX "select_pool_general_id_key"
|
||||
ON "select_pool"("general_id");
|
||||
CREATE INDEX "select_pool_owner_user_id_idx"
|
||||
ON "select_pool"("owner_user_id");
|
||||
CREATE INDEX "select_pool_reserved_until_general_id_idx"
|
||||
ON "select_pool"("reserved_until", "general_id");
|
||||
@@ -6,6 +6,7 @@ export interface DatabaseClient {
|
||||
$executeRaw: GamePrismaClient['$executeRaw'];
|
||||
worldState: GamePrisma.WorldStateDelegate;
|
||||
general: GamePrisma.GeneralDelegate;
|
||||
selectPoolEntry: GamePrisma.SelectPoolEntryDelegate;
|
||||
generalAccessLog: GamePrisma.GeneralAccessLogDelegate;
|
||||
trafficPeriod: GamePrisma.TrafficPeriodDelegate;
|
||||
trafficPeriodGeneral: GamePrisma.TrafficPeriodGeneralDelegate;
|
||||
|
||||
@@ -49,6 +49,7 @@ export interface TurnEngineGeneralRow {
|
||||
deadYear: number;
|
||||
affinity: number | null;
|
||||
picture: string | null;
|
||||
imageServer: number;
|
||||
meta: JsonValue;
|
||||
penalty: JsonValue;
|
||||
turnTime: Date;
|
||||
@@ -193,6 +194,8 @@ export interface TurnEngineGeneralUpdateInput {
|
||||
bornYear?: number;
|
||||
deadYear?: number;
|
||||
picture: string | null;
|
||||
imageServer: number;
|
||||
startAge: number;
|
||||
horseCode: string;
|
||||
weaponCode: string;
|
||||
bookCode: string;
|
||||
@@ -208,6 +211,7 @@ export interface TurnEngineGeneralUpdateInput {
|
||||
|
||||
export interface TurnEngineGeneralCreateManyInput {
|
||||
id: number;
|
||||
userId?: string | null;
|
||||
name: string;
|
||||
nationId: number;
|
||||
cityId: number;
|
||||
@@ -241,6 +245,8 @@ export interface TurnEngineGeneralCreateManyInput {
|
||||
bornYear?: number;
|
||||
deadYear?: number;
|
||||
picture?: string | null;
|
||||
imageServer?: number;
|
||||
startAge?: number;
|
||||
lastTurn?: InputJsonValue;
|
||||
penalty?: InputJsonValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user