feat: add GeneralTurn and NationTurn models with CRUD operations

- Introduced GeneralTurn and NationTurn models in Prisma schema.
- Implemented reserved turns management in the game API, including loading, setting, and shifting turns for generals and nations.
- Created unit tests for reserved turns functionality to ensure correctness.
- Developed reserved turn handler to process actions based on reserved turns.
- Established in-memory storage for reserved turns with persistence to the database.
This commit is contained in:
2025-12-30 04:45:07 +00:00
parent e4c57e2467
commit 6fe6d54432
13 changed files with 1949 additions and 15 deletions
+10
View File
@@ -28,6 +28,16 @@ const buildContext = (options?: {
nation: {
findUnique: async () => null,
},
generalTurn: {
findMany: async () => [],
deleteMany: async () => ({}),
createMany: async () => ({}),
},
nationTurn: {
findMany: async () => [],
deleteMany: async () => ({}),
createMany: async () => ({}),
},
};
return {
db,