feat: 군대 관련 기능 추가 및 명령어 정의 업데이트

This commit is contained in:
2026-01-04 13:54:30 +00:00
parent 4fe4af868a
commit b2a625d4e7
16 changed files with 534 additions and 8 deletions
+24 -1
View File
@@ -4,8 +4,12 @@ export interface DatabaseClient<
CityRow = unknown,
NationRow = unknown,
GeneralTurnRow = unknown,
NationTurnRow = unknown
NationTurnRow = unknown,
TroopRow = unknown
> {
$transaction<T = unknown>(
queries: Array<Promise<T>>
): Promise<T[]>;
$queryRaw<T = unknown>(
query: TemplateStringsArray,
...values: unknown[]
@@ -19,9 +23,20 @@ export interface DatabaseClient<
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>;
@@ -63,4 +78,12 @@ export interface DatabaseClient<
}>;
}): Promise<unknown>;
};
troop: {
findUnique(args: {
where: { troopLeaderId: number };
}): Promise<TroopRow | null>;
deleteMany(args: {
where: { troopLeaderId: number };
}): Promise<unknown>;
};
}