refactor(backend): Streamlining van de testdata voor leerpaden en leerobjecten + integratie in seed
Hierbij ook testdata functionaliteit toegevoegd om makkelijk nieuwe leerpaden aan te maken.
This commit is contained in:
parent
4092f1f617
commit
202cf4e33c
32 changed files with 691 additions and 493 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property, Rel } from '@mikro-orm/core';
|
||||
import {Collection, Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property, Rel} from '@mikro-orm/core';
|
||||
import { LearningPath } from './learning-path.entity.js';
|
||||
import { LearningPathTransition } from './learning-path-transition.entity.js';
|
||||
import { Language } from '@dwengo-1/common/util/language';
|
||||
|
@ -27,7 +27,7 @@ export class LearningPathNode {
|
|||
startNode!: boolean;
|
||||
|
||||
@OneToMany({ entity: () => LearningPathTransition, mappedBy: 'node' })
|
||||
transitions: LearningPathTransition[] = [];
|
||||
transitions: Collection<LearningPathTransition> = new Collection<LearningPathTransition>(this);
|
||||
|
||||
@Property({ length: 3 })
|
||||
createdAt: Date = new Date();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue