style: fix linting issues met Prettier
This commit is contained in:
parent
aa1a85e64e
commit
2a2881ec30
84 changed files with 846 additions and 1013 deletions
|
@ -2,9 +2,9 @@ import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro
|
|||
import { Class } from '../classes/class.entity.js';
|
||||
import { Group } from './group.entity.js';
|
||||
import { Language } from '../content/language.js';
|
||||
import {AssignmentRepository} from "../../data/assignments/assignment-repository";
|
||||
import { AssignmentRepository } from '../../data/assignments/assignment-repository';
|
||||
|
||||
@Entity({repository: () => AssignmentRepository})
|
||||
@Entity({ repository: () => AssignmentRepository })
|
||||
export class Assignment {
|
||||
@ManyToOne({ entity: () => Class, primary: true })
|
||||
within!: Class;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Entity, ManyToMany, ManyToOne, PrimaryKey } from '@mikro-orm/core';
|
||||
import { Assignment } from './assignment.entity.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import {GroupRepository} from "../../data/assignments/group-repository";
|
||||
import { GroupRepository } from '../../data/assignments/group-repository';
|
||||
|
||||
@Entity({repository: () => GroupRepository})
|
||||
@Entity({ repository: () => GroupRepository })
|
||||
export class Group {
|
||||
@ManyToOne({
|
||||
entity: () => Assignment,
|
||||
|
|
|
@ -2,9 +2,9 @@ import { Student } from '../users/student.entity.js';
|
|||
import { Group } from './group.entity.js';
|
||||
import { Entity, Enum, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from '../content/language.js';
|
||||
import {SubmissionRepository} from "../../data/assignments/submission-repository";
|
||||
import { SubmissionRepository } from '../../data/assignments/submission-repository';
|
||||
|
||||
@Entity({repository: () => SubmissionRepository})
|
||||
@Entity({ repository: () => SubmissionRepository })
|
||||
export class Submission {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Entity, Enum, ManyToOne } from '@mikro-orm/core';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import { Class } from './class.entity.js';
|
||||
import {ClassJoinRequestRepository} from "../../data/classes/class-join-request-repository";
|
||||
import { ClassJoinRequestRepository } from '../../data/classes/class-join-request-repository';
|
||||
|
||||
@Entity({repository: () => ClassJoinRequestRepository})
|
||||
@Entity({ repository: () => ClassJoinRequestRepository })
|
||||
export class ClassJoinRequest {
|
||||
@ManyToOne({
|
||||
entity: () => Student,
|
||||
|
|
|
@ -2,9 +2,9 @@ import { Collection, Entity, ManyToMany, PrimaryKey, Property } from '@mikro-orm
|
|||
import { v4 } from 'uuid';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import {ClassRepository} from "../../data/classes/class-repository";
|
||||
import { ClassRepository } from '../../data/classes/class-repository';
|
||||
|
||||
@Entity({repository: () => ClassRepository})
|
||||
@Entity({ repository: () => ClassRepository })
|
||||
export class Class {
|
||||
@PrimaryKey()
|
||||
classId = v4();
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { Entity, ManyToOne } from '@mikro-orm/core';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import { Class } from './class.entity.js';
|
||||
import {TeacherInvitationRepository} from "../../data/classes/teacher-invitation-repository";
|
||||
import { TeacherInvitationRepository } from '../../data/classes/teacher-invitation-repository';
|
||||
|
||||
/**
|
||||
* Invitation of a teacher into a class (in order to teach it).
|
||||
*/
|
||||
@Entity({repository: () => TeacherInvitationRepository})
|
||||
@Entity({ repository: () => TeacherInvitationRepository })
|
||||
export class TeacherInvitation {
|
||||
@ManyToOne({
|
||||
entity: () => Teacher,
|
||||
|
|
|
@ -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[] = [];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Question } from './question.entity.js';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import {AnswerRepository} from "../../data/questions/answer-repository";
|
||||
import { AnswerRepository } from '../../data/questions/answer-repository';
|
||||
|
||||
@Entity({repository: () => AnswerRepository})
|
||||
@Entity({ repository: () => AnswerRepository })
|
||||
export class Answer {
|
||||
@ManyToOne({
|
||||
entity: () => Teacher,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Entity, Enum, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from '../content/language.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import {QuestionRepository} from "../../data/questions/question-repository";
|
||||
import { QuestionRepository } from '../../data/questions/question-repository';
|
||||
|
||||
@Entity({repository: () => QuestionRepository})
|
||||
@Entity({ repository: () => QuestionRepository })
|
||||
export class Question {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Collection, Entity, ManyToMany } from '@mikro-orm/core';
|
||||
import { User } from './user.entity.js';
|
||||
import { Class } from '../classes/class.entity.js';
|
||||
import {TeacherRepository} from "../../data/users/teacher-repository";
|
||||
import { TeacherRepository } from '../../data/users/teacher-repository';
|
||||
|
||||
@Entity({repository: () => TeacherRepository})
|
||||
@Entity({ repository: () => TeacherRepository })
|
||||
export class Teacher extends User {
|
||||
@ManyToMany(() => Class)
|
||||
classes!: Collection<Class>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue