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/assignment.ts
Normal file
25
backend/src/interfaces/assignment.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Assignment } from "../entities/assignments/assignment.entity";
|
||||
import { Class } from "../entities/classes/class.entity";
|
||||
import { GroupDTO } from "./group";
|
||||
|
||||
export interface AssignmentDTO {
|
||||
id: number,
|
||||
class: string, // id of class 'within'
|
||||
title: string,
|
||||
description: string,
|
||||
learningPath: string,
|
||||
language: string,
|
||||
groups?: GroupDTO[], // TODO
|
||||
}
|
||||
|
||||
export function mapToAssignmentDTO(assignment: Assignment, cls: Class): AssignmentDTO {
|
||||
return {
|
||||
id: assignment.id,
|
||||
class: cls.classId,
|
||||
title: assignment.title,
|
||||
description: assignment.description,
|
||||
learningPath: assignment.learningPathHruid,
|
||||
language: assignment.learningPathLanguage,
|
||||
//groups: assignment.groups.map(mapToGroupDTO),
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue