fix: import errors van gabe gefixt, teacher en student abstractie weggedaan

This commit is contained in:
Adriaan Jacquet 2025-03-13 18:44:41 +01:00
parent 6404335040
commit b5390258e3
36 changed files with 9754 additions and 180 deletions

View file

@ -0,0 +1,33 @@
import { Teacher } from '../entities/users/teacher.entity.js';
export interface TeacherDTO {
id: string;
username: string;
firstName: string;
lastName: string;
endpoints?: {
classes: string;
questions: string;
invitations: string;
groups: string;
};
}
export function mapToTeacherDTO(teacher: Teacher): TeacherDTO {
return {
id: teacher.username,
username: teacher.username,
firstName: teacher.firstName,
lastName: teacher.lastName,
};
}
export function mapToTeacher(TeacherData: TeacherDTO): Teacher {
const teacher = new Teacher(
TeacherData.username,
TeacherData.firstName,
TeacherData.lastName,
);
return teacher;
}