feat(backend): Repositories toegevoegd, databank unit-testbaar gemaakt.

This commit is contained in:
Gerald Schmittinger 2025-02-24 01:13:20 +01:00
parent 2657e49ad6
commit 374de3b21a
15 changed files with 1672 additions and 45 deletions

View file

@ -0,0 +1,11 @@
import {DwengoEntityRepository} from "../dwengo-entity-repository";
import {Student} from "../../entities/users/student.entity";
export class StudentRepository extends DwengoEntityRepository<Student> {
public findByUsername(username: string): Promise<Student | null> {
return this.findOne({username: username});
}
public deleteByUsername(username: string): Promise<void> {
return this.deleteWhere({username: username});
}
}