Correction validation création géolocalisation
This commit is contained in:
parent
7750c1b75c
commit
fc1773b5a6
@ -1,24 +1,40 @@
|
||||
import { ApiProperty } from "@nestjs/swagger"
|
||||
import { Type } from "class-transformer"
|
||||
import { IsDate, IsLatitude, IsLongitude, IsNumber } from "class-validator"
|
||||
|
||||
export class CreateGeolocationDto {
|
||||
@ApiProperty({description: "Longitude en degrés"})
|
||||
@IsLongitude()
|
||||
@Type(() => Number)
|
||||
@ApiProperty({description: "Longitude en degrés", required: true})
|
||||
longitude: number
|
||||
|
||||
@IsLatitude()
|
||||
@Type(() => Number)
|
||||
@ApiProperty({description: "Latitude en degrés"})
|
||||
latitude: number
|
||||
|
||||
@IsNumber()
|
||||
@Type(() => Number)
|
||||
@ApiProperty({description: "Vitesse en mètres par seconde"})
|
||||
speed: number
|
||||
|
||||
@IsNumber()
|
||||
@Type(() => Number)
|
||||
@ApiProperty({description: "Précision en mètres de la position obtenue"})
|
||||
accuracy: number
|
||||
|
||||
@IsNumber()
|
||||
@Type(() => Number)
|
||||
@ApiProperty({description: "Altitude en mètres"})
|
||||
altitude: number
|
||||
|
||||
@IsNumber()
|
||||
@Type(() => Number)
|
||||
@ApiProperty({description: "Précision de l'altitude en mètres"})
|
||||
altitudeAccuracy: number
|
||||
|
||||
@IsDate()
|
||||
@Type(() => Date)
|
||||
@ApiProperty({description: "Date et heure de capture de la géolocalisation"})
|
||||
timestamp: Date
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user