@@ -1,8 +1,8 @@
|
||||
import { IsDateString, IsNotEmpty } from "class-validator";
|
||||
import { RunnerCard } from '../entities/RunnerCard';
|
||||
import { ScanStation } from '../entities/ScanStation';
|
||||
import { TrackScan } from '../entities/TrackScan';
|
||||
import { ResponseRunnerCard } from './ResponseRunnerCard';
|
||||
import { ResponseScan } from './ResponseScan';
|
||||
import { ResponseScanStation } from './ResponseScanStation';
|
||||
import { ResponseTrack } from './ResponseTrack';
|
||||
|
||||
/**
|
||||
@@ -19,13 +19,13 @@ export class ResponseTrackScan extends ResponseScan {
|
||||
* The runnerCard associated with the scan.
|
||||
*/
|
||||
@IsNotEmpty()
|
||||
card: RunnerCard;
|
||||
card: ResponseRunnerCard;
|
||||
|
||||
/**
|
||||
* The scanning station that created the scan.
|
||||
*/
|
||||
@IsNotEmpty()
|
||||
station: ScanStation;
|
||||
station: ResponseScanStation;
|
||||
|
||||
/**
|
||||
* The scan's creation timestamp.
|
||||
@@ -41,8 +41,9 @@ export class ResponseTrackScan extends ResponseScan {
|
||||
public constructor(scan: TrackScan) {
|
||||
super(scan);
|
||||
this.track = new ResponseTrack(scan.track);
|
||||
this.card = scan.card;
|
||||
this.station = scan.station;
|
||||
this.card = scan.card.toResponse();
|
||||
this.station = scan.station.toResponse();
|
||||
this.timestamp = scan.timestamp;
|
||||
this.distance = scan.distance;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user