@@ -2,6 +2,12 @@ import {Node} from "./node.model";
22import { Trainrun } from "./trainrun.model" ;
33import { Label } from "./label.model" ;
44import { Note } from "./note.model" ;
5+ import {
6+ FreeFloatingTextDto ,
7+ LabelDto ,
8+ NodeDto ,
9+ TrainrunDto ,
10+ } from "../data-structures/business.data.structures" ;
511
612enum OperationType {
713 create = "create" ,
@@ -27,38 +33,38 @@ abstract class Operation {
2733}
2834
2935class TrainrunOperation extends Operation {
30- readonly trainrun : Trainrun ;
36+ readonly trainrun : TrainrunDto ;
3137
3238 constructor ( operationType : OperationType , trainrun : Trainrun ) {
3339 super ( operationType , OperationObjectType . trainrun ) ;
34- this . trainrun = trainrun ;
40+ this . trainrun = trainrun . getDto ( ) ;
3541 }
3642}
3743
3844class NodeOperation extends Operation {
39- readonly node : Node ;
45+ readonly node : NodeDto ;
4046
4147 constructor ( operationType : OperationType , node : Node ) {
4248 super ( operationType , OperationObjectType . node ) ;
43- this . node = node ;
49+ this . node = node . getDto ( ) ;
4450 }
4551}
4652
4753class LabelOperation extends Operation {
48- readonly label : Label ;
54+ readonly label : LabelDto ;
4955
5056 constructor ( operationType : OperationType , label : Label ) {
5157 super ( operationType , OperationObjectType . label ) ;
52- this . label = label ;
58+ this . label = label . getDto ( ) ;
5359 }
5460}
5561
5662class NoteOperation extends Operation {
57- readonly note : Note ;
63+ readonly note : FreeFloatingTextDto ;
5864
5965 constructor ( operationType : OperationType , note : Note ) {
6066 super ( operationType , OperationObjectType . note ) ;
61- this . note = note ;
67+ this . note = note . getDto ( ) ;
6268 }
6369}
6470
0 commit comments