feat(backend): ClassRepository & gerelateerde repo's aangemaakt

ClassRepository, ClassJoinRequestRepository en TeacherInvitationRepository aangemaakt.
This commit is contained in:
Gerald Schmittinger 2025-02-25 23:18:04 +01:00
parent c527bae7fc
commit bd93e5fae3
4 changed files with 46 additions and 0 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;
}