fix: Teacher entity had geen commit (vorige was verkeerde file)
This commit is contained in:
		
							parent
							
								
									cc459ce6bb
								
							
						
					
					
						commit
						41cea9bbf0
					
				
					 1 changed files with 14 additions and 1 deletions
				
			
		|  | @ -1,11 +1,24 @@ | |||
| import { Collection, Entity, ManyToMany } from '@mikro-orm/core'; | ||||
| import { User } from './user.entity.js'; | ||||
| import { Class } from '../classes/class.entity.js'; | ||||
| import { TeacherRepository } from '../../data/users/teacher-repository.js'; | ||||
| 
 | ||||
| @Entity() | ||||
| @Entity({ | ||||
|     repository: () => { | ||||
|         return TeacherRepository; | ||||
|     }, | ||||
| }) | ||||
| export class Teacher extends User { | ||||
|     @ManyToMany(() => { | ||||
|         return Class; | ||||
|     }) | ||||
|     classes!: Collection<Class>; | ||||
| 
 | ||||
|     constructor( | ||||
|         public username: string, | ||||
|         public firstName: string, | ||||
|         public lastName: string | ||||
|     ) { | ||||
|         super(); | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Reference in a new issue
	
	 Laure Jablonski
						Laure Jablonski