feat(backup): User- en TeacherRepository toegevoegd
This commit is contained in:
		
							parent
							
								
									b730be375c
								
							
						
					
					
						commit
						22fea6de83
					
				
					 2 changed files with 22 additions and 0 deletions
				
			
		
							
								
								
									
										11
									
								
								backend/src/data/users/user-repository.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								backend/src/data/users/user-repository.ts
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
import {DwengoEntityRepository} from "../dwengo-entity-repository";
 | 
			
		||||
import {User} from "../../entities/users/user.entity";
 | 
			
		||||
 | 
			
		||||
export class StudentRepository extends DwengoEntityRepository<User> {
 | 
			
		||||
    public findByUsername(username: string): Promise<User | null> {
 | 
			
		||||
        return this.findOne({username: username});
 | 
			
		||||
    }
 | 
			
		||||
    public deleteByUsername(username: string): Promise<void> {
 | 
			
		||||
        return this.deleteWhere({username: username});
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in a new issue