Volk Überarbeittung und Englisch Varaiblen ersetzt
This commit is contained in:
1 parent
9282777ac9
commit
8520678a48
11 files changed
+231
-104
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
|
||||
import { ColonyType } from '../../../generated/prisma';
|
||||
import { IsEnum, IsInt, IsOptional, IsString, Max, Min } from 'class-validator';
|
||||
import { ColonyCondition, ColonyType } from '../../../generated/prisma';
|
||||
|
||||
export class CreateColonyDto {
|
||||
@ApiProperty()
|
||||
@@ -25,25 +25,27 @@ export class CreateColonyDto {
|
||||
@IsString()
|
||||
originText?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@ApiPropertyOptional({ minimum: 1, maximum: 10 })
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(10)
|
||||
strength?: number;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@ApiPropertyOptional({ enum: ColonyCondition })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
broodStatus?: string;
|
||||
@IsEnum(ColonyCondition)
|
||||
broodStatus?: ColonyCondition;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@ApiPropertyOptional({ enum: ColonyCondition })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
feedStatus?: string;
|
||||
@IsEnum(ColonyCondition)
|
||||
feedStatus?: ColonyCondition;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@ApiPropertyOptional({ enum: ColonyCondition })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
healthStatus?: string;
|
||||
@IsEnum(ColonyCondition)
|
||||
healthStatus?: ColonyCondition;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
|
||||
Reference in new issue
Block a user