Files
football-next/types/quiz.ts
2026-05-03 17:01:46 +03:30

24 lines
542 B
TypeScript

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;
};