fix: interface bestanden enkelvoud
This commit is contained in:
parent
9c9e7c4870
commit
4968d7cb07
12 changed files with 20 additions and 20 deletions
25
backend/src/interfaces/class.ts
Normal file
25
backend/src/interfaces/class.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Class } from "../entities/classes/class.entity";
|
||||
|
||||
export interface ClassDTO {
|
||||
id: string;
|
||||
displayName: string;
|
||||
teachers: string[];
|
||||
students: string[];
|
||||
joinRequests: string[];
|
||||
endpoints?: {
|
||||
self: string;
|
||||
invitations: string;
|
||||
assignments: string;
|
||||
students: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToClassDTO(cls: Class): ClassDTO {
|
||||
return {
|
||||
id: cls.classId,
|
||||
displayName: cls.displayName,
|
||||
teachers: cls.teachers.map(teacher => teacher.username),
|
||||
students: cls.students.map(student => student.username),
|
||||
joinRequests: [], // TODO
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue