VarroaModule mit Erfassung und Colony-Historie-Endpunkt fuer Varroamessungen.
50 lines
866 B
TypeScript
50 lines
866 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import {
|
|
IsDateString,
|
|
IsEnum,
|
|
IsInt,
|
|
IsNumber,
|
|
IsOptional,
|
|
IsString,
|
|
} from 'class-validator';
|
|
import { VarroaMethod } from '../../../generated/prisma';
|
|
|
|
export class CreateVarroaMeasurementDto {
|
|
@ApiProperty()
|
|
@IsString()
|
|
colonyId!: string;
|
|
|
|
@ApiProperty()
|
|
@IsDateString()
|
|
date!: string;
|
|
|
|
@ApiProperty({ enum: VarroaMethod })
|
|
@IsEnum(VarroaMethod)
|
|
method!: VarroaMethod;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsInt()
|
|
durationMinutes?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsInt()
|
|
miteCount?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsNumber()
|
|
calculatedValue?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
assessment?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
notes?: string;
|
|
}
|