This commit is contained in:
2026-05-03 17:01:46 +03:30
parent b5ad5420b2
commit 9c30295b4b
76 changed files with 7891 additions and 461 deletions

23
types/quiz.ts Normal file
View 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;
};