2025SELab2-project-Dwengo/backend/src/entities/content/learning-path-transition.entity.ts
2025-03-11 03:09:12 +00:00

17 lines
494 B
TypeScript

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 })
node!: LearningPathNode;
@PrimaryKey({ type: 'numeric' })
transitionNumber!: number;
@Property({ type: 'string' })
condition!: string;
@ManyToOne({ entity: () => LearningPathNode })
next!: LearningPathNode;
}