feat(backend): Assignment-, Group- en SubmissionRepository aangemaakt

This commit is contained in:
Gerald Schmittinger 2025-02-26 00:00:18 +01:00
parent bd93e5fae3
commit 2837618fd5
8 changed files with 75 additions and 4 deletions

View file

@ -1,28 +0,0 @@
import {Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property} from "@mikro-orm/core";
import {Class} from "../classes/class.entity";
import {Group} from "./group.entity"
import {Language} from "../content/language";
@Entity()
export class Assignment {
@ManyToOne({entity: () => Class, primary: true})
within!: Class;
@PrimaryKey({type: "number"})
id!: number;
@Property({type: "string"})
title!: string;
@Property({type: "text"})
description!: string;
@Property({type: "string"})
learningPathHruid!: string;
@Enum({items: () => Language})
learningPathLanguage!: Language;
@OneToMany({entity: () => Group, mappedBy: "assignment"})
groups!: Group[];
}