api/src/modules/sourcing-records/dto/create.sourcing-record.dto.ts
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsNumber, IsOptional, IsString } from 'class-validator';
export class CreateSourcingRecordDto {
@IsNumber()
@ApiProperty()
tonnage!: number;
@IsNumber()
@ApiProperty()
year!: number;
@IsString()
@IsOptional()
@ApiPropertyOptional()
sourcingLocationsId?: string;
}