io
This commit is contained in:
23
types/quiz.ts
Normal file
23
types/quiz.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { DailyQuiz, QuizQuestion, QuizSubmission, GoldenCard, Player, Country, User } from "@prisma/client";
|
||||
|
||||
export type QuizWithQuestions = DailyQuiz & {
|
||||
questions: QuizQuestion[];
|
||||
};
|
||||
|
||||
export type QuizSubmissionWithQuiz = QuizSubmission & {
|
||||
quiz: QuizWithQuestions;
|
||||
};
|
||||
|
||||
export type GoldenCardWithPlayer = GoldenCard & {
|
||||
player: Player & {
|
||||
country: Country;
|
||||
};
|
||||
user?: Pick<User, "id" | "name" | "email">;
|
||||
};
|
||||
|
||||
export type QuizResult = {
|
||||
score: number;
|
||||
correct: number;
|
||||
total: number;
|
||||
submission: QuizSubmission;
|
||||
};
|
||||
Reference in New Issue
Block a user