2024-02-28 17:02:46 +08:00
|
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
import { IsOptional, IsString, MinLength } from 'class-validator';
|
2024-02-28 08:32:35 +08:00
|
|
|
|
2024-02-28 17:02:46 +08:00
|
|
|
import { PagerDto } from '~/common/dto/pager.dto';
|
2024-02-28 08:32:35 +08:00
|
|
|
|
|
|
|
export class ParamConfigDto {
|
|
|
|
@ApiProperty({ description: '参数名称' })
|
|
|
|
@IsString()
|
2024-02-28 17:02:46 +08:00
|
|
|
name: string;
|
2024-02-28 08:32:35 +08:00
|
|
|
|
|
|
|
@ApiProperty({ description: '参数键名' })
|
|
|
|
@IsString()
|
|
|
|
@MinLength(3)
|
2024-02-28 17:02:46 +08:00
|
|
|
key: string;
|
2024-02-28 08:32:35 +08:00
|
|
|
|
|
|
|
@ApiProperty({ description: '参数值' })
|
|
|
|
@IsString()
|
2024-02-28 17:02:46 +08:00
|
|
|
value: string;
|
2024-02-28 08:32:35 +08:00
|
|
|
|
|
|
|
@ApiProperty({ description: '备注' })
|
|
|
|
@IsOptional()
|
|
|
|
@IsString()
|
2024-02-28 17:02:46 +08:00
|
|
|
remark?: string;
|
2024-02-28 08:32:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export class ParamConfigQueryDto extends PagerDto {
|
|
|
|
@ApiProperty({ description: '参数名称' })
|
|
|
|
@IsString()
|
|
|
|
@IsOptional()
|
2024-02-28 17:02:46 +08:00
|
|
|
name: string;
|
2024-02-28 08:32:35 +08:00
|
|
|
}
|