Merge branch 'dev' into chore/logging
This commit is contained in:
commit
f82668148c
122 changed files with 6026 additions and 14446 deletions
15
backend/src/entities/assignments/group.entity.ts
Normal file
15
backend/src/entities/assignments/group.entity.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Entity, ManyToMany, ManyToOne, PrimaryKey } from '@mikro-orm/core';
|
||||
import { Assignment } from './assignment.entity.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class Group {
|
||||
@ManyToOne({ entity: () => {return Assignment}, primary: true })
|
||||
assignment!: Assignment;
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
groupNumber!: number;
|
||||
|
||||
@ManyToMany({ entity: () => {return Student} })
|
||||
members!: Student[];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue