style: fix linting issues met Prettier
This commit is contained in:
parent
aa1a85e64e
commit
2a2881ec30
84 changed files with 846 additions and 1013 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { LearningObject } from './learning-object.entity.js';
|
||||
import {AttachmentRepository} from "../../data/content/attachment-repository";
|
||||
import { AttachmentRepository } from '../../data/content/attachment-repository';
|
||||
|
||||
@Entity({repository: () => AttachmentRepository})
|
||||
@Entity({ repository: () => AttachmentRepository })
|
||||
export class Attachment {
|
||||
@ManyToOne({
|
||||
entity: () => LearningObject,
|
||||
|
|
|
@ -182,5 +182,5 @@ export enum Language {
|
|||
Yiddish = 'yi',
|
||||
Yoruba = 'yo',
|
||||
Zhuang = 'za',
|
||||
Zulu = 'zu'
|
||||
Zulu = 'zu',
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@ import { Embeddable, Embedded, Entity, Enum, ManyToMany, OneToMany, PrimaryKey,
|
|||
import { Language } from './language.js';
|
||||
import { Attachment } from './attachment.entity.js';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import {DwengoContentType} from "../../services/learning-objects/processing/content-type";
|
||||
import {v4} from "uuid";
|
||||
import {LearningObjectRepository} from "../../data/content/learning-object-repository";
|
||||
import { DwengoContentType } from '../../services/learning-objects/processing/content-type';
|
||||
import { v4 } from 'uuid';
|
||||
import { LearningObjectRepository } from '../../data/content/learning-object-repository';
|
||||
|
||||
@Entity({repository: () => LearningObjectRepository})
|
||||
@Entity({ repository: () => LearningObjectRepository })
|
||||
export class LearningObject {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
hruid!: string;
|
||||
|
@ -20,7 +20,7 @@ export class LearningObject {
|
|||
@PrimaryKey({ type: 'number' })
|
||||
version: number = 1;
|
||||
|
||||
@Property({type: 'uuid', unique: true})
|
||||
@Property({ type: 'uuid', unique: true })
|
||||
uuid = v4();
|
||||
|
||||
@ManyToMany({
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
import {Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property} from "@mikro-orm/core";
|
||||
import {Language} from "./language";
|
||||
import {LearningPath} from "./learning-path.entity";
|
||||
import {LearningPathTransition} from "./learning-path-transition.entity";
|
||||
import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from './language';
|
||||
import { LearningPath } from './learning-path.entity';
|
||||
import { LearningPathTransition } from './learning-path-transition.entity';
|
||||
|
||||
@Entity()
|
||||
export class LearningPathNode {
|
||||
|
||||
@ManyToOne({ entity: () => LearningPath, primary: true })
|
||||
learningPath!: LearningPath;
|
||||
|
||||
@PrimaryKey({ type: "integer", autoincrement: true })
|
||||
@PrimaryKey({ type: 'integer', autoincrement: true })
|
||||
nodeNumber!: number;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
|
@ -27,7 +26,7 @@ export class LearningPathNode {
|
|||
@Property({ type: 'bool' })
|
||||
startNode!: boolean;
|
||||
|
||||
@OneToMany({ entity: () => LearningPathTransition, mappedBy: "node" })
|
||||
@OneToMany({ entity: () => LearningPathTransition, mappedBy: 'node' })
|
||||
transitions: LearningPathTransition[] = [];
|
||||
|
||||
@Property({ length: 3 })
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import {Entity, ManyToOne, PrimaryKey, Property} from "@mikro-orm/core";
|
||||
import {LearningPathNode} from "./learning-path-node.entity";
|
||||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { LearningPathNode } from './learning-path-node.entity';
|
||||
|
||||
@Entity()
|
||||
export class LearningPathTransition {
|
||||
@ManyToOne({entity: () => LearningPathNode, primary: true })
|
||||
@ManyToOne({ entity: () => LearningPathNode, primary: true })
|
||||
node!: LearningPathNode;
|
||||
|
||||
@PrimaryKey({ type: 'numeric' })
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
import {
|
||||
Entity,
|
||||
Enum,
|
||||
ManyToMany, OneToMany,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from '@mikro-orm/core';
|
||||
import { Entity, Enum, ManyToMany, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from './language.js';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import {LearningPathRepository} from "../../data/content/learning-path-repository";
|
||||
import {LearningPathNode} from "./learning-path-node.entity";
|
||||
import { LearningPathRepository } from '../../data/content/learning-path-repository';
|
||||
import { LearningPathNode } from './learning-path-node.entity';
|
||||
|
||||
@Entity({repository: () => LearningPathRepository})
|
||||
@Entity({ repository: () => LearningPathRepository })
|
||||
export class LearningPath {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
hruid!: string;
|
||||
|
@ -30,6 +24,6 @@ export class LearningPath {
|
|||
@Property({ type: 'blob', nullable: true })
|
||||
image: Buffer | null = null;
|
||||
|
||||
@OneToMany({ entity: () => LearningPathNode, mappedBy: "learningPath" })
|
||||
@OneToMany({ entity: () => LearningPathNode, mappedBy: 'learningPath' })
|
||||
nodes: LearningPathNode[] = [];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue