feat: add latitude/longitude to ticket update endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
kevin-asprec
2026-05-04 13:21:54 +08:00
parent ff0dd2e418
commit c923285c7e
2 changed files with 16 additions and 34 deletions

View File

@@ -1,4 +1,5 @@
import { IsString, IsOptional, IsIn, MinLength, IsUUID } from 'class-validator';
import { IsString, IsOptional, IsIn, MinLength, IsUUID, IsNumber } from 'class-validator';
import { Transform } from 'class-transformer';
export class UpdateTicketDto {
@IsOptional()
@@ -23,4 +24,14 @@ export class UpdateTicketDto {
@IsString()
@IsIn(['open', 'in_progress', 'resolved', 'cancelled'])
status?: string;
@IsOptional()
@Transform(({ value }) => value !== undefined && value !== null ? Number(value) : undefined)
@IsNumber()
latitude?: number;
@IsOptional()
@Transform(({ value }) => value !== undefined && value !== null ? Number(value) : undefined)
@IsNumber()
longitude?: number;
}