feat(backend): Entities toegevoegd

Entites Class, Class Join Request, Class Invitation, Assignment, Group en entities om de Dwengo-leerinhoud te modelleren, toegevoegd.
This commit is contained in:
Gerald Schmittinger 2025-02-23 10:02:19 +01:00
parent 62a278a6e0
commit d5101737ef
14 changed files with 289 additions and 7 deletions

View file

@ -0,0 +1,18 @@
import {Entity, ManyToOne} from "@mikro-orm/core";
import {Teacher} from "../users/teacher.entity";
import {Class} from "./class.entity";
/**
* Invitation of a teacher into a class (in order to teach it).
*/
@Entity()
export class TeacherInvitation {
@ManyToOne({entity: () => Teacher, primary: true})
sender!: Teacher;
@ManyToOne({entity: () => Teacher, primary: true})
receiver!: Teacher;
@ManyToOne({entity: () => Class, primary: true})
class!: Class;
}