Merge branch 'dev' into chore/logging
This commit is contained in:
commit
f82668148c
122 changed files with 6026 additions and 14446 deletions
21
backend/src/entities/classes/class-join-request.entity.ts
Normal file
21
backend/src/entities/classes/class-join-request.entity.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Entity, Enum, ManyToOne } from '@mikro-orm/core';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import { Class } from './class.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class ClassJoinRequest {
|
||||
@ManyToOne({ entity: () => {return Student}, primary: true })
|
||||
requester!: Student;
|
||||
|
||||
@ManyToOne({ entity: () => {return Class}, primary: true })
|
||||
class!: Class;
|
||||
|
||||
@Enum(() => {return ClassJoinRequestStatus})
|
||||
status!: ClassJoinRequestStatus;
|
||||
}
|
||||
|
||||
export enum ClassJoinRequestStatus {
|
||||
Open = 'open',
|
||||
Accepted = 'accepted',
|
||||
Declined = 'declined',
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue