import { ApiProperty, PartialType } from '@nestjs/swagger' import { IsOptional, IsString } from 'class-validator' export class CreateProviderDto { @IsString() @ApiProperty({ required: true }) name: string @IsOptional() @IsString() @ApiProperty() code: string @IsString() @ApiProperty({ required: true }) username: string @IsString() @ApiProperty({ required: true }) password: string } export class UpdateProviderDto extends PartialType(CreateProviderDto) {}