feat: 调整项目层级
This commit is contained in:
14
server/src/modules/system/config/dto/create-config.dto.ts
Normal file
14
server/src/modules/system/config/dto/create-config.dto.ts
Normal 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;
|
||||
}
|
||||
10
server/src/modules/system/config/dto/query-list.dto.ts
Normal file
10
server/src/modules/system/config/dto/query-list.dto.ts
Normal 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;
|
||||
}
|
||||
@@ -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),
|
||||
) {}
|
||||
Reference in New Issue
Block a user