feat(backend): ClassRepository & gerelateerde repo's aangemaakt
ClassRepository, ClassJoinRequestRepository en TeacherInvitationRepository aangemaakt.
This commit is contained in:
parent
c527bae7fc
commit
bd93e5fae3
4 changed files with 46 additions and 0 deletions
11
backend/src/data/classes/class-repository.ts
Normal file
11
backend/src/data/classes/class-repository.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import {DwengoEntityRepository} from "../dwengo-entity-repository";
|
||||
import {Class} from "../../entities/classes/class.entity";
|
||||
|
||||
export class ClassRepository extends DwengoEntityRepository<Class> {
|
||||
public findById(id: string): Promise<Class | null> {
|
||||
return this.findOne({classId: id});
|
||||
}
|
||||
public deleteById(id: string): Promise<void> {
|
||||
return this.deleteWhere({classId: id});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue