Merge remote-tracking branch 'origin/dev' into feat/endpoints-in-backend-om-eigen-leerpaden-en-leerobjecten-toe-te-voegen-aan-de-databank-#248
This commit is contained in:
		
						commit
						db92eff759
					
				
					 26 changed files with 9291 additions and 659 deletions
				
			
		|  | @ -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; | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger