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:
Gerald Schmittinger 2025-03-11 03:01:18 +01:00
commit cd0a3a8a7b
119 changed files with 8837 additions and 1697 deletions

View file

@ -1,13 +1,4 @@
import {
Embeddable,
Embedded,
Entity,
Enum,
ManyToMany,
OneToMany,
PrimaryKey,
Property,
} from '@mikro-orm/core';
import { Embeddable, Embedded, Entity, Enum, ManyToMany, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
import { Language } from './language.js';
import { Attachment } from './attachment.entity.js';
import { Teacher } from '../users/teacher.entity.js';
@ -20,7 +11,10 @@ export class LearningObject {
@PrimaryKey({ type: 'string' })
hruid!: string;
@Enum({ items: () => Language, primary: true })
@Enum({
items: () => Language,
primary: true,
})
language!: Language;
@PrimaryKey({ type: 'number' })
@ -29,7 +23,9 @@ export class LearningObject {
@Property({type: 'uuid', unique: true})
uuid = v4();
@ManyToMany({ entity: () => Teacher })
@ManyToMany({
entity: () => Teacher,
})
admins!: Teacher[];
@Property({ type: 'string' })
@ -53,7 +49,10 @@ export class LearningObject {
@Property({ type: 'array' })
skosConcepts!: string[];
@Embedded({ entity: () => EducationalGoal, array: true })
@Embedded({
entity: () => EducationalGoal,
array: true,
})
educationalGoals: EducationalGoal[] = [];
@Property({ type: 'string' })
@ -68,7 +67,9 @@ export class LearningObject {
@Property({ type: 'integer' })
estimatedTime!: number;
@Embedded({ entity: () => ReturnValue })
@Embedded({
entity: () => ReturnValue,
})
returnValue!: ReturnValue;
@Property({ type: 'bool' })
@ -77,7 +78,10 @@ export class LearningObject {
@Property({ type: 'string', nullable: true })
contentLocation?: string;
@OneToMany({ entity: () => Attachment, mappedBy: 'learningObject' })
@OneToMany({
entity: () => Attachment,
mappedBy: 'learningObject',
})
attachments: Attachment[] = [];
@Property({ type: 'blob' })