Merge remote-tracking branch 'origin/dev' into feat/endpoints-beschermen-met-authenticatie-#105

This commit is contained in:
Gabriellvl 2025-05-09 18:11:18 +02:00
commit c13788f269
26 changed files with 9315 additions and 630 deletions

View file

@ -1,15 +1,17 @@
import { Collection, Entity, ManyToMany, PrimaryKey, Property } from '@mikro-orm/core';
import { v4 } from 'uuid';
import { Teacher } from '../users/teacher.entity.js';
import { Student } from '../users/student.entity.js';
import { ClassRepository } from '../../data/classes/class-repository.js';
import { customAlphabet } from 'nanoid';
const generateClassId = customAlphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 6);
@Entity({
repository: () => ClassRepository,
})
export class Class {
@PrimaryKey()
classId? = v4();
classId? = generateClassId();
@Property({ type: 'string' })
displayName!: string;