fix(backend): Formatting + .env.development.example

npm run format uitgevoerd, .env.development.example toegevoegd.
This commit is contained in:
Gerald Schmittinger 2025-02-26 22:03:53 +01:00
parent 4e883a1a18
commit 48c8ce7c57
36 changed files with 499 additions and 331 deletions

View file

@ -1,13 +1,13 @@
import {Entity, Enum, ManyToOne} from "@mikro-orm/core";
import {Student} from "../users/student.entity";
import {Class} from "./class.entity";
import { Entity, Enum, ManyToOne } from '@mikro-orm/core';
import { Student } from '../users/student.entity';
import { Class } from './class.entity';
@Entity()
export class ClassJoinRequest {
@ManyToOne({entity: () => Student, primary: true})
@ManyToOne({ entity: () => Student, primary: true })
requester!: Student;
@ManyToOne({entity: () => Class, primary: true})
@ManyToOne({ entity: () => Class, primary: true })
class!: Class;
@Enum(() => ClassJoinRequestStatus)
@ -15,7 +15,7 @@ export class ClassJoinRequest {
}
export enum ClassJoinRequestStatus {
Open = "open",
Accepted = "accepted",
Declined = "declined"
Open = 'open',
Accepted = 'accepted',
Declined = 'declined',
}

View file

@ -1,14 +1,20 @@
import {Collection, Entity, ManyToMany, PrimaryKey, Property} from "@mikro-orm/core";
import {
Collection,
Entity,
ManyToMany,
PrimaryKey,
Property,
} from '@mikro-orm/core';
import { v4 } from 'uuid';
import {Teacher} from "../users/teacher.entity";
import {Student} from "../users/student.entity";
import { Teacher } from '../users/teacher.entity';
import { Student } from '../users/student.entity';
@Entity()
export class Class {
@PrimaryKey()
classId = v4();
@Property({type: "string"})
@Property({ type: 'string' })
displayName!: string;
@ManyToMany(() => Teacher)

View file

@ -1,18 +1,18 @@
import {Entity, ManyToOne} from "@mikro-orm/core";
import {Teacher} from "../users/teacher.entity";
import {Class} from "./class.entity";
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})
@ManyToOne({ entity: () => Teacher, primary: true })
sender!: Teacher;
@ManyToOne({entity: () => Teacher, primary: true})
@ManyToOne({ entity: () => Teacher, primary: true })
receiver!: Teacher;
@ManyToOne({entity: () => Class, primary: true})
@ManyToOne({ entity: () => Class, primary: true })
class!: Class;
}