chore: import DH V2 D5.6.4 production baseline
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
IsArray,
|
||||
IsEnum,
|
||||
IsISO8601,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Max,
|
||||
MaxLength,
|
||||
Min,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { AssetGeometryType } from '../../database/entities';
|
||||
|
||||
export class AssetGeometryPayloadDto {
|
||||
@IsEnum(AssetGeometryType)
|
||||
type!: AssetGeometryType;
|
||||
|
||||
@IsArray()
|
||||
coordinates!: unknown[];
|
||||
}
|
||||
|
||||
export class UpsertAssetGeometryDto {
|
||||
@ValidateNested()
|
||||
@Type(() => AssetGeometryPayloadDto)
|
||||
geometry!: AssetGeometryPayloadDto;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber({ maxDecimalPlaces: 3 })
|
||||
@Min(0)
|
||||
@Max(100_000)
|
||||
accuracyM?: number | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsISO8601({ strict: true })
|
||||
capturedAt?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(255)
|
||||
deviceLabel?: string | null;
|
||||
}
|
||||
Reference in New Issue
Block a user