feat(responses): Added created_at/updated_at
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
|
||||
IsBoolean,
|
||||
IsInt,
|
||||
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
IsObject,
|
||||
|
||||
IsOptional,
|
||||
IsPositive,
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { ScanStation } from '../entities/ScanStation';
|
||||
@@ -63,6 +63,14 @@ export class ResponseScanStation implements IResponse {
|
||||
@IsBoolean()
|
||||
enabled?: boolean = true;
|
||||
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
created_at: number;
|
||||
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
updated_at: number;
|
||||
|
||||
/**
|
||||
* Creates a ResponseStatsClient object from a statsClient.
|
||||
* @param client The statsClient the response shall be build for.
|
||||
@@ -74,5 +82,7 @@ export class ResponseScanStation implements IResponse {
|
||||
this.key = "Only visible on creation.";
|
||||
if (station.track) { this.track = station.track.toResponse(); }
|
||||
this.enabled = station.enabled;
|
||||
this.created_at = station.created_at;
|
||||
this.updated_at = station.updated_at;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user