fix(backend): Formatting + .env.development.example

npm run format uitgevoerd, .env.development.example toegevoegd.
This commit is contained in:
Gerald Schmittinger 2025-02-26 22:03:53 +01:00
parent 4e883a1a18
commit 48c8ce7c57
36 changed files with 499 additions and 331 deletions

View file

@ -1,57 +1,66 @@
import {Embeddable, Embedded, Entity, Enum, ManyToMany, OneToOne, PrimaryKey, Property} from "@mikro-orm/core";
import {Language} from "./language";
import {Teacher} from "../users/teacher.entity";
import {
Embeddable,
Embedded,
Entity,
Enum,
ManyToMany,
OneToOne,
PrimaryKey,
Property,
} from '@mikro-orm/core';
import { Language } from './language';
import { Teacher } from '../users/teacher.entity';
@Entity()
export class LearningPath {
@PrimaryKey({type: "string"})
@PrimaryKey({ type: 'string' })
hruid!: string;
@Enum({items: () => Language, primary: true})
@Enum({ items: () => Language, primary: true })
language!: Language;
@ManyToMany({entity: () => Teacher})
@ManyToMany({ entity: () => Teacher })
admins!: Teacher[];
@Property({type: "string"})
@Property({ type: 'string' })
title!: string;
@Property({type: "text"})
@Property({ type: 'text' })
description!: string;
@Property({type: "blob"})
@Property({ type: 'blob' })
image!: string;
@Embedded({entity: () => LearningPathNode, array: true})
@Embedded({ entity: () => LearningPathNode, array: true })
nodes: LearningPathNode[] = [];
}
@Embeddable()
export class LearningPathNode {
@Property({type: "string"})
@Property({ type: 'string' })
learningObjectHruid!: string;
@Enum({items: () => Language})
@Enum({ items: () => Language })
language!: Language;
@Property({type: "string"})
@Property({ type: 'string' })
version!: string;
@Property({type: "longtext"})
@Property({ type: 'longtext' })
instruction!: string;
@Property({type: "bool"})
@Property({ type: 'bool' })
startNode!: boolean;
@Embedded({entity: () => LearningPathTransition, array: true})
@Embedded({ entity: () => LearningPathTransition, array: true })
transitions!: LearningPathTransition[];
}
@Embeddable()
export class LearningPathTransition {
@Property({type: "string"})
@Property({ type: 'string' })
condition!: string;
@OneToOne({entity: () => LearningPathNode})
@OneToOne({ entity: () => LearningPathNode })
next!: LearningPathNode;
}