26 tests covering: full pipeline flow for 3 report types + generic fallback, status polling (GENERATING → READY/FAILED transitions), quota enforcement and user scoping, error handling (PDF failure, AI failure, auth checks), delete cleanup flow, and temp file lifecycle. Co-Authored-By: Paperclip <noreply@paperclip.ing>
30 lines
818 B
TypeScript
30 lines
818 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsNumber, IsOptional, IsString, Max, Min } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
|
|
export class AnalyzeIndustrialLocationDto {
|
|
@ApiProperty({ example: 10.9, description: 'Vĩ độ' })
|
|
@IsNumber()
|
|
@Type(() => Number)
|
|
@Min(-90)
|
|
@Max(90)
|
|
latitude!: number;
|
|
|
|
@ApiProperty({ example: 106.8, description: 'Kinh độ' })
|
|
@IsNumber()
|
|
@Type(() => Number)
|
|
@Min(-180)
|
|
@Max(180)
|
|
longitude!: number;
|
|
|
|
@ApiPropertyOptional({ example: 'VSIP Bình Dương', description: 'Tên KCN cần phân tích' })
|
|
@IsOptional()
|
|
@IsString()
|
|
park_name?: string;
|
|
|
|
@ApiPropertyOptional({ example: 'electronics', description: 'Ngành mục tiêu' })
|
|
@IsOptional()
|
|
@IsString()
|
|
target_industry?: string;
|
|
}
|