refactor: update Quiz schema and Prisma types for enhanced data structure
- Replaced existing score and answers fields in the Quiz schema with more descriptive fields: numberOfCorrectAnswers, numberOfIncorrectAnswers, numberOfQuestions, correctPoints, totalPoints, and userInput. - Updated the PrismaTypes interface to remove the questions relation and streamline the data model, ensuring better clarity and maintainability. - Updated the subproject reference in the epess-database to the latest commit for consistency in project dependencies.
This commit is contained in:
Submodule epess-database updated: 6883288b87...fbc33785c8
@@ -80,9 +80,13 @@ export class QuizSchema extends PothosSchema {
|
|||||||
quiz: t.relation('quiz'),
|
quiz: t.relation('quiz'),
|
||||||
userId: t.exposeID('userId'),
|
userId: t.exposeID('userId'),
|
||||||
user: t.relation('user'),
|
user: t.relation('user'),
|
||||||
score: t.exposeInt('score'),
|
numberOfCorrectAnswers: t.exposeInt('numberOfCorrectAnswers'),
|
||||||
questions: t.relation('questions'),
|
numberOfIncorrectAnswers: t.exposeInt('numberOfIncorrectAnswers'),
|
||||||
answers: t.exposeStringList('answers'),
|
numberOfQuestions: t.exposeInt('numberOfQuestions'),
|
||||||
|
correctPoints: t.exposeInt('correctPoints'),
|
||||||
|
totalPoints: t.exposeInt('totalPoints'),
|
||||||
|
userInput: t.exposeStringList('userInput'),
|
||||||
|
questions: t.exposeStringList('questions'),
|
||||||
createdAt: t.expose('createdAt', {
|
createdAt: t.expose('createdAt', {
|
||||||
type: 'DateTime',
|
type: 'DateTime',
|
||||||
}),
|
}),
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user