feat(gateway): 프로필별 첫 기수 번호를 관리한다
첫 기수 번호를 완료 게임 수의 기준값으로 적용하고 0기를 API와 화면에서 보존한다. 시즌 번호와 독립된 RESET 계약을 관리 패널, 테스트, 운영 문서에 반영한다.
This commit is contained in:
@@ -41,6 +41,8 @@ describeDatabase('selected workspace profile seed CLI', () => {
|
||||
const requestFile = path.join(tempDirectory, 'request.json');
|
||||
const connector = createGamePostgresConnector({ url: databaseUrl });
|
||||
try {
|
||||
await connector.connect();
|
||||
const completedGameCount = await connector.prisma.gameHistory.count({ where: { status: 'COMPLETED' } });
|
||||
await fs.writeFile(
|
||||
requestFile,
|
||||
JSON.stringify({
|
||||
@@ -49,6 +51,7 @@ describeDatabase('selected workspace profile seed CLI', () => {
|
||||
now: '2036-03-03T00:00:00.000Z',
|
||||
installOptions: {
|
||||
serverId: 'selected-cli-seed',
|
||||
firstGameIdx: 0,
|
||||
installOperationId: 'selected-cli-operation',
|
||||
installCommitSha: 'selected-cli-commit',
|
||||
},
|
||||
@@ -63,11 +66,12 @@ describeDatabase('selected workspace profile seed CLI', () => {
|
||||
|
||||
const result = await runSeedCli(requestFile);
|
||||
expect(result, result.output).toMatchObject({ code: 0 });
|
||||
await connector.connect();
|
||||
const world = await connector.prisma.worldState.findFirstOrThrow();
|
||||
expect(world).toMatchObject({
|
||||
scenarioCode: '1010',
|
||||
meta: {
|
||||
firstGameIdx: 0,
|
||||
gameIdx: completedGameCount,
|
||||
installOperationId: 'selected-cli-operation',
|
||||
installCommitSha: 'selected-cli-commit',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user