feat: 调整项目层级

This commit is contained in:
2024-11-27 14:30:20 +08:00
parent 5eb78c35c2
commit b02e2d2160
43 changed files with 17 additions and 12 deletions

View File

@@ -0,0 +1,14 @@
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
export class CreateConfigDto {
@IsNotEmpty()
@IsString()
key: string;
@IsNotEmpty()
@IsString()
value: string;
@IsOptional()
remark: string;
}

View File

@@ -0,0 +1,10 @@
import { PaginationDto } from '@/common/dto/pagination.dto';
import { IsOptional } from 'class-validator';
export class QueryListDto extends PaginationDto {
@IsOptional()
key?: string;
@IsOptional()
value?: string;
}

View File

@@ -0,0 +1,6 @@
import { OmitType, PartialType } from '@nestjs/mapped-types';
import { CreateConfigDto } from './create-config.dto';
export class UpdateConfigDto extends PartialType(
OmitType(CreateConfigDto, ['key'] as const),
) {}