fix(admin): 预种开关DTO添加class-validator装饰器,修复400错误

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-26 20:26:42 -08:00
parent 37a5610d74
commit 8d7fd68509
1 changed files with 6 additions and 0 deletions

View File

@ -9,15 +9,21 @@ import {
HttpStatus,
} from '@nestjs/common';
import { ApiTags, ApiOperation, ApiResponse, ApiQuery } from '@nestjs/swagger';
import { IsBoolean, IsOptional, IsString } from 'class-validator';
import { PrePlantingConfigService } from './pre-planting-config.service';
import { PrePlantingProxyService } from './pre-planting-proxy.service';
class UpdatePrePlantingConfigDto {
@IsBoolean()
isActive: boolean;
@IsOptional()
@IsString()
updatedBy?: string;
}
class TogglePrePlantingConfigDto {
@IsBoolean()
isActive: boolean;
}