feat(backend): Repositories toegevoegd, databank unit-testbaar gemaakt.
This commit is contained in:
parent
2657e49ad6
commit
374de3b21a
15 changed files with 1672 additions and 45 deletions
|
@ -2,12 +2,17 @@ import {User} from "./user.entity";
|
|||
import {Collection, Entity, ManyToMany} from '@mikro-orm/core';
|
||||
import {Class} from "../classes/class.entity";
|
||||
import {Group} from "../assigments/group.entity";
|
||||
import {StudentRepository} from "../../data/users/student-repository";
|
||||
|
||||
@Entity()
|
||||
@Entity({repository: () => StudentRepository})
|
||||
export class Student extends User {
|
||||
@ManyToMany(() => Class)
|
||||
classes!: Collection<Class>;
|
||||
|
||||
@ManyToMany(() => Group)
|
||||
groups!: Collection<Group>;
|
||||
|
||||
constructor(public username: string, public firstName: string, public lastName: string) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue