- Schema III: per-user notifications (broadcast fan-out migration, category, link, requiredPermissions filter), notification preferences and settings endpoints, calendar withdrawal switch, occupiedFrames - Suggestions API: list/summary with permission visibility and paging, accept/dismiss/reopen incl. bulk, SuggestionView on all responses - Varroa traffic light by season and method, young colonies, treatment effect window, sample-based percentage; shared withdrawal-window helper on Berlin calendar days; GET /varroa-measurements/thresholds - ColonySplit and QueenAssigned domain events with calendar and webhook handlers - Outbox claims compare against now() rounded to timestamp(3); fixes the flaky e2e claims of rows written with SQL now() Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
67 lines
1.1 KiB
TypeScript
67 lines
1.1 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import {
|
|
IsDateString,
|
|
IsEnum,
|
|
IsInt,
|
|
IsNumber,
|
|
IsOptional,
|
|
IsString,
|
|
Max,
|
|
Min,
|
|
} 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()
|
|
@Min(0)
|
|
durationMinutes?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsInt()
|
|
@Min(0)
|
|
miteCount?: number;
|
|
|
|
@ApiPropertyOptional({
|
|
description:
|
|
'Sample size in bees (powdered sugar, washing); the percentage is mites / sample * 100.',
|
|
minimum: 1,
|
|
maximum: 2000,
|
|
})
|
|
@IsOptional()
|
|
@IsInt()
|
|
@Min(1)
|
|
@Max(2000)
|
|
sampleBees?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsNumber()
|
|
@Min(0)
|
|
calculatedValue?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
assessment?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
notes?: string;
|
|
}
|