feat(backend): Submission entity toegevoegd.

This commit is contained in:
Gerald Schmittinger 2025-02-23 15:04:34 +01:00
parent 4d3964c31f
commit cdfe48d8c5

View file

@ -0,0 +1,22 @@
import {Student} from "../users/student.entity";
import {Group} from "./group.entity";
import {Entity, Enum, ManyToOne, PrimaryKey} from "@mikro-orm/core";
import {Language} from "../content/language";
@Entity()
export class Submission {
@ManyToOne({entity: () => Student, primary: true})
submitter!: Student;
@ManyToOne({entity: () => Group, primary: true})
onBehalfOf!: Group;
@PrimaryKey({type: "string"})
hruid!: string;
@Enum({items: () => Language, primary: true})
language!: Language;
@PrimaryKey({type: "string"})
version: number = "1";
}