feat(backend): Fütterungen-Modul (Modul 9)
FeedingsModule mit Erfassung, Colony-Historie und Mengensummen-Endpunkt je Einheit.
This commit is contained in:
1 parent
1f71ac9e3c
commit
cc0aaf0a31
9 files changed
+382
-1
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsDateString,
|
||||
IsEnum,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
} from 'class-validator';
|
||||
import { FeedType } from '../../../generated/prisma';
|
||||
|
||||
export class CreateFeedingDto {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
colonyId!: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsDateString()
|
||||
date!: string;
|
||||
|
||||
@ApiProperty({ enum: FeedType })
|
||||
@IsEnum(FeedType)
|
||||
feedType!: FeedType;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
product?: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsNumber()
|
||||
amount!: number;
|
||||
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
unit!: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
batchNumber?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
Reference in new issue
Block a user