Merge remote-tracking branch 'origin/dev' into feature/own-learning-objects
# Conflicts: # backend/package.json # backend/src/config.ts # backend/src/controllers/learningObjects.ts # backend/src/controllers/learningPaths.ts # backend/src/data/content/attachment-repository.ts # backend/src/data/content/learning-object-repository.ts # backend/src/data/content/learning-path-repository.ts # backend/src/data/repositories.ts # backend/src/entities/content/learning-path.entity.ts # backend/src/exceptions.ts # backend/src/routes/learning-objects.ts # backend/src/services/learningObjects.ts # backend/src/services/learningPaths.ts # backend/src/util/apiHelper.ts # backend/src/util/envvars.ts # package-lock.json
This commit is contained in:
commit
cd0a3a8a7b
119 changed files with 8837 additions and 1697 deletions
|
@ -1,11 +1,4 @@
|
|||
import {
|
||||
Entity,
|
||||
Enum,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from '@mikro-orm/core';
|
||||
import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Class } from '../classes/class.entity.js';
|
||||
import { Group } from './group.entity.js';
|
||||
import { Language } from '../content/language.js';
|
||||
|
|
|
@ -5,12 +5,17 @@ import {GroupRepository} from "../../data/assignments/group-repository";
|
|||
|
||||
@Entity({repository: () => GroupRepository})
|
||||
export class Group {
|
||||
@ManyToOne({ entity: () => Assignment, primary: true })
|
||||
@ManyToOne({
|
||||
entity: () => Assignment,
|
||||
primary: true,
|
||||
})
|
||||
assignment!: Assignment;
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
groupNumber!: number;
|
||||
|
||||
@ManyToMany({ entity: () => Student })
|
||||
@ManyToMany({
|
||||
entity: () => Student,
|
||||
})
|
||||
members!: Student[];
|
||||
}
|
||||
|
|
|
@ -9,7 +9,10 @@ export class Submission {
|
|||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
||||
@Enum({ items: () => Language, primary: true })
|
||||
@Enum({
|
||||
items: () => Language,
|
||||
primary: true,
|
||||
})
|
||||
learningObjectLanguage!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'string' })
|
||||
|
@ -18,13 +21,18 @@ export class Submission {
|
|||
@PrimaryKey({ type: 'integer' })
|
||||
submissionNumber!: number;
|
||||
|
||||
@ManyToOne({ entity: () => Student })
|
||||
@ManyToOne({
|
||||
entity: () => Student,
|
||||
})
|
||||
submitter!: Student;
|
||||
|
||||
@Property({ type: 'datetime' })
|
||||
submissionTime!: Date;
|
||||
|
||||
@ManyToOne({ entity: () => Group, nullable: true })
|
||||
@ManyToOne({
|
||||
entity: () => Group,
|
||||
nullable: true,
|
||||
})
|
||||
onBehalfOf?: Group;
|
||||
|
||||
@Property({ type: 'json' })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue