fix(backend): Formatting + .env.development.example
npm run format uitgevoerd, .env.development.example toegevoegd.
This commit is contained in:
parent
4e883a1a18
commit
48c8ce7c57
36 changed files with 499 additions and 331 deletions
|
@ -1,28 +1,35 @@
|
|||
import {Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property} from "@mikro-orm/core";
|
||||
import {Class} from "../classes/class.entity";
|
||||
import {Group} from "./group.entity"
|
||||
import {Language} from "../content/language";
|
||||
import {
|
||||
Entity,
|
||||
Enum,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from '@mikro-orm/core';
|
||||
import { Class } from '../classes/class.entity';
|
||||
import { Group } from './group.entity';
|
||||
import { Language } from '../content/language';
|
||||
|
||||
@Entity()
|
||||
export class Assignment {
|
||||
@ManyToOne({entity: () => Class, primary: true})
|
||||
@ManyToOne({ entity: () => Class, primary: true })
|
||||
within!: Class;
|
||||
|
||||
@PrimaryKey({type: "number"})
|
||||
@PrimaryKey({ type: 'number' })
|
||||
id!: number;
|
||||
|
||||
@Property({type: "string"})
|
||||
@Property({ type: 'string' })
|
||||
title!: string;
|
||||
|
||||
@Property({type: "text"})
|
||||
@Property({ type: 'text' })
|
||||
description!: string;
|
||||
|
||||
@Property({type: "string"})
|
||||
@Property({ type: 'string' })
|
||||
learningPathHruid!: string;
|
||||
|
||||
@Enum({items: () => Language})
|
||||
@Enum({ items: () => Language })
|
||||
learningPathLanguage!: Language;
|
||||
|
||||
@OneToMany({entity: () => Group, mappedBy: "assignment"})
|
||||
@OneToMany({ entity: () => Group, mappedBy: 'assignment' })
|
||||
groups!: Group[];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue