F4: remove legacy survey report DTO
This commit is contained in:
@@ -1,58 +0,0 @@
|
|||||||
import { Type } from 'class-transformer';
|
|
||||||
import {
|
|
||||||
ArrayMaxSize,
|
|
||||||
ArrayUnique,
|
|
||||||
IsArray,
|
|
||||||
IsEnum,
|
|
||||||
IsISO8601,
|
|
||||||
IsNumber,
|
|
||||||
IsOptional,
|
|
||||||
IsString,
|
|
||||||
IsUUID,
|
|
||||||
Max,
|
|
||||||
MaxLength,
|
|
||||||
Min,
|
|
||||||
} from 'class-validator';
|
|
||||||
import { SurveyReportOutcome } from '../../database/entities';
|
|
||||||
|
|
||||||
export class SaveSurveyReportDto {
|
|
||||||
@IsOptional()
|
|
||||||
@IsEnum(SurveyReportOutcome)
|
|
||||||
outcome?: SurveyReportOutcome | null;
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsISO8601({ strict: true })
|
|
||||||
observedAt?: string | null;
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber({ maxDecimalPlaces: 6 })
|
|
||||||
@Min(-90)
|
|
||||||
@Max(90)
|
|
||||||
latitude?: number | null;
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber({ maxDecimalPlaces: 6 })
|
|
||||||
@Min(-180)
|
|
||||||
@Max(180)
|
|
||||||
longitude?: number | null;
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber({ maxDecimalPlaces: 3 })
|
|
||||||
@Min(0)
|
|
||||||
@Max(100000)
|
|
||||||
accuracyM?: number | null;
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
@MaxLength(8000)
|
|
||||||
notes?: string | null;
|
|
||||||
|
|
||||||
@IsArray()
|
|
||||||
@ArrayMaxSize(50)
|
|
||||||
@ArrayUnique()
|
|
||||||
@IsUUID('4', { each: true })
|
|
||||||
mediaIds!: string[];
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user