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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user