feat: GamePrisma를 사용하여 데이터베이스 클라이언트 및 관련 타입 정의 업데이트
This commit is contained in:
+12
-88
@@ -1,89 +1,13 @@
|
||||
export interface DatabaseClient<
|
||||
WorldStateRow = unknown,
|
||||
GeneralRow = unknown,
|
||||
CityRow = unknown,
|
||||
NationRow = unknown,
|
||||
GeneralTurnRow = unknown,
|
||||
NationTurnRow = unknown,
|
||||
TroopRow = unknown
|
||||
> {
|
||||
$transaction<T = unknown>(
|
||||
queries: Array<Promise<T>>
|
||||
): Promise<T[]>;
|
||||
$queryRaw<T = unknown>(
|
||||
query: TemplateStringsArray,
|
||||
...values: unknown[]
|
||||
): Promise<T>;
|
||||
worldState: {
|
||||
findFirst(args?: unknown): Promise<WorldStateRow | null>;
|
||||
};
|
||||
general: {
|
||||
findUnique(args: { where: { id: number } }): Promise<GeneralRow | null>;
|
||||
findFirst(args: {
|
||||
where: { userId?: string; npcState?: number | { gt: number } };
|
||||
select?: { name?: boolean; picture?: boolean };
|
||||
}): Promise<GeneralRow | null>;
|
||||
findMany(args: {
|
||||
where?: { nationId?: number };
|
||||
}): Promise<GeneralRow[]>;
|
||||
count(args?: {
|
||||
where?: { npcState?: number | { gt: number } };
|
||||
}): Promise<number>;
|
||||
update(args: {
|
||||
where: { id: number };
|
||||
data: Partial<GeneralRow>;
|
||||
}): Promise<GeneralRow>;
|
||||
updateMany(args: {
|
||||
where: { troopId?: number };
|
||||
data: Partial<GeneralRow>;
|
||||
}): Promise<unknown>;
|
||||
};
|
||||
city: {
|
||||
findUnique(args: { where: { id: number } }): Promise<CityRow | null>;
|
||||
};
|
||||
nation: {
|
||||
findUnique(args: { where: { id: number } }): Promise<NationRow | null>;
|
||||
count(args?: { where?: { level?: { gt: number } } }): Promise<number>;
|
||||
};
|
||||
generalTurn: {
|
||||
findMany(args: {
|
||||
where: { generalId: number };
|
||||
orderBy?: { turnIdx: 'asc' | 'desc' }[];
|
||||
}): Promise<GeneralTurnRow[]>;
|
||||
deleteMany(args: { where: { generalId: number } }): Promise<unknown>;
|
||||
createMany(args: {
|
||||
data: Array<{
|
||||
generalId: number;
|
||||
turnIdx: number;
|
||||
actionCode: string;
|
||||
arg: unknown;
|
||||
}>;
|
||||
}): Promise<unknown>;
|
||||
};
|
||||
nationTurn: {
|
||||
findMany(args: {
|
||||
where: { nationId: number; officerLevel: number };
|
||||
orderBy?: { turnIdx: 'asc' | 'desc' }[];
|
||||
}): Promise<NationTurnRow[]>;
|
||||
deleteMany(args: {
|
||||
where: { nationId: number; officerLevel: number };
|
||||
}): Promise<unknown>;
|
||||
createMany(args: {
|
||||
data: Array<{
|
||||
nationId: number;
|
||||
officerLevel: number;
|
||||
turnIdx: number;
|
||||
actionCode: string;
|
||||
arg: unknown;
|
||||
}>;
|
||||
}): Promise<unknown>;
|
||||
};
|
||||
troop: {
|
||||
findUnique(args: {
|
||||
where: { troopLeaderId: number };
|
||||
}): Promise<TroopRow | null>;
|
||||
deleteMany(args: {
|
||||
where: { troopLeaderId: number };
|
||||
}): Promise<unknown>;
|
||||
};
|
||||
import type { GamePrisma, GamePrismaClient } from './gamePrisma.js';
|
||||
|
||||
export interface DatabaseClient {
|
||||
$transaction: GamePrismaClient['$transaction'];
|
||||
$queryRaw: GamePrismaClient['$queryRaw'];
|
||||
worldState: GamePrisma.WorldStateDelegate;
|
||||
general: GamePrisma.GeneralDelegate;
|
||||
city: GamePrisma.CityDelegate;
|
||||
nation: GamePrisma.NationDelegate;
|
||||
generalTurn: GamePrisma.GeneralTurnDelegate;
|
||||
nationTurn: GamePrisma.NationTurnDelegate;
|
||||
troop: GamePrisma.TroopDelegate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user