File
|
Optional
capacity
|
Type : number
|
Decorators :
@ApiPropertyOptional({example: 50, description: 'Tons per hour capacity'}) @IsOptional() @IsNumber()
|
|
|
|
Optional
category
|
Type : string
|
Decorators :
@ApiPropertyOptional({example: 'ELECTRONICS', description: 'Bay category: ELECTRONICS, MACHINERY, CONSUMER, MIXED'}) @IsOptional() @IsString()
|
|
|
|
code
|
Type : string
|
Decorators :
@ApiProperty({example: 'BA1'}) @IsString() @IsNotEmpty()
|
|
|
|
Optional
latitude
|
Type : number
|
Decorators :
@ApiPropertyOptional({example: undefined, description: 'Bay GPS latitude'}) @IsOptional() @IsNumber()
|
|
|
|
Optional
longitude
|
Type : number
|
Decorators :
@ApiPropertyOptional({example: 36.8575, description: 'Bay GPS longitude'}) @IsOptional() @IsNumber()
|
|
|
|
name
|
Type : string
|
Decorators :
@ApiProperty({example: 'Bay A1'}) @IsString() @IsNotEmpty()
|
|
|
|
Optional
radiusMeters
|
Type : number
|
Decorators :
@ApiPropertyOptional({example: 50, description: 'Max distance in meters for loading confirmation'}) @IsOptional() @IsNumber()
|
|
|
|
Optional
shiftCapacity
|
Type : number
|
Decorators :
@ApiPropertyOptional({example: 12, description: 'Trucks per 8hr shift'}) @IsOptional() @IsInt()
|
|
|
|
Optional
siteId
|
Type : string
|
Decorators :
@ApiPropertyOptional() @IsOptional() @IsString()
|
|
|
|
Optional
siteName
|
Type : string
|
Decorators :
@ApiPropertyOptional() @IsOptional() @IsString()
|
|
|
import { IsNotEmpty, IsString, IsOptional, IsNumber, IsInt } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class CreateLoadingBayDto {
@ApiProperty({ example: 'Bay A1' })
@IsString()
@IsNotEmpty()
name: string;
@ApiProperty({ example: 'BA1' })
@IsString()
@IsNotEmpty()
code: string;
@ApiPropertyOptional()
@IsOptional()
@IsString()
siteId?: string;
@ApiPropertyOptional()
@IsOptional()
@IsString()
siteName?: string;
@ApiPropertyOptional({ example: 50, description: 'Tons per hour capacity' })
@IsOptional()
@IsNumber()
capacity?: number;
@ApiPropertyOptional({ example: 12, description: 'Trucks per 8hr shift' })
@IsOptional()
@IsInt()
shiftCapacity?: number;
@ApiPropertyOptional({ example: 'ELECTRONICS', description: 'Bay category: ELECTRONICS, MACHINERY, CONSUMER, MIXED' })
@IsOptional()
@IsString()
category?: string;
@ApiPropertyOptional({ example: -1.3028, description: 'Bay GPS latitude' })
@IsOptional()
@IsNumber()
latitude?: number;
@ApiPropertyOptional({ example: 36.8575, description: 'Bay GPS longitude' })
@IsOptional()
@IsNumber()
longitude?: number;
@ApiPropertyOptional({ example: 50, description: 'Max distance in meters for loading confirmation' })
@IsOptional()
@IsNumber()
radiusMeters?: number;
}