Vizzuality/landgriffon

View on GitHub
api/src/modules/sourcing-records/dto/create.sourcing-record.dto.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
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;
}