feat(backend): Question + Answer entities toegevoegd; kleine verbeteringen.

This commit is contained in:
Gerald Schmittinger 2025-02-23 16:48:06 +01:00
parent cdfe48d8c5
commit 2657e49ad6
6 changed files with 79 additions and 19 deletions

View file

@ -1,7 +1,7 @@
import {Entity, ManyToOne, OneToMany, PrimaryKey, Property} from "@mikro-orm/core";
import {Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property} from "@mikro-orm/core";
import {Class} from "../classes/class.entity";
import {LearningPath} from "../content/learning-path.entity";
import {Group} from "./group.entity"
import {Language} from "../content/language";
@Entity()
export class Assignment {
@ -17,8 +17,11 @@ export class Assignment {
@Property({type: "text"})
description!: string;
@ManyToOne({entity: () => LearningPath})
task!: LearningPath;
@Property({type: "string"})
learningPathHruid!: string;
@Enum({items: () => Language})
learningPathLanguage!: Language;
@OneToMany({entity: () => Group, mappedBy: "assignment"})
groups!: Group[];