import {Module} from "@/interfaces";
import {Stat} from "./user";

export type UserResults = {[key in Module]: ModuleResult};

interface ModuleResult {
	exams: string[];
	score: number;
	total: number;
}

export interface Assignment {
	id: string;
	name: string;
	assigner: string;
	assignees: string[];
	results: {
		user: string;
		type: "academic" | "general";
		stats: Stat[];
	}[];
	exams: {id: string; module: Module, assignee: string}[];
	startDate: Date;
	endDate: Date;
}
