feat(backend): Submission entity toegevoegd.
This commit is contained in:
parent
4d3964c31f
commit
cdfe48d8c5
1 changed files with 22 additions and 0 deletions
22
backend/src/entities/assigments/submission.entity.ts
Normal file
22
backend/src/entities/assigments/submission.entity.ts
Normal 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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue