frontend/src/types/index.ts
2020-08-23 16:10:10 +02:00

34 lines
531 B
TypeScript

const COURSE = 'course';
const CLASS = 'class';
export type GroupType = typeof COURSE | typeof CLASS;
export interface Basket {
id: number;
name: string;
lecture: Group | null;
class: Group | null;
}
export interface Group {
id: number;
day: number;
time: string;
lecturer: string;
room: string;
type: GroupType;
capacity?: number;
}
export interface Course {
id: number;
name: string;
groups: Array<Group>;
}
export interface User {
name?: string;
surname?: string;
ticket: string | null;
}