feat(responses): Added created_at/updated_at

This commit is contained in:
2025-05-06 19:38:20 +02:00
parent 728f8a14e9
commit f225cc4954
11 changed files with 120 additions and 8 deletions

View File

@@ -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;
}
}