feat(backend): Question + Answer entities toegevoegd; kleine verbeteringen.
This commit is contained in:
parent
cdfe48d8c5
commit
2657e49ad6
6 changed files with 79 additions and 19 deletions
|
@ -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[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue