MERGE: dev ino feat/service-layer
This commit is contained in:
commit
6404335040
220 changed files with 12582 additions and 10400 deletions
|
@ -1,7 +1,6 @@
|
|||
import { Collection, Entity, ManyToMany, ManyToOne, PrimaryKey } from '@mikro-orm/core';
|
||||
import { Assignment } from './assignment.entity.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import { GroupRepository } from '../../data/assignments/group-repository.js';
|
||||
|
||||
@Entity({
|
||||
repository: () => {
|
||||
|
@ -10,9 +9,7 @@ import { GroupRepository } from '../../data/assignments/group-repository.js';
|
|||
})
|
||||
export class Group {
|
||||
@ManyToOne({
|
||||
entity: () => {
|
||||
return Assignment;
|
||||
},
|
||||
entity: () => Assignment,
|
||||
primary: true,
|
||||
})
|
||||
assignment!: Assignment;
|
||||
|
@ -20,8 +17,8 @@ export class Group {
|
|||
@PrimaryKey({ type: 'integer', autoincrement: true })
|
||||
groupNumber?: number;
|
||||
|
||||
@ManyToMany(() => {
|
||||
return Student;
|
||||
@ManyToMany({
|
||||
entity: () => Student,
|
||||
})
|
||||
members!: Collection<Student>;
|
||||
members!: Student[];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue