refactor user accounts structure
This commit is contained in:
@@ -1,15 +1,23 @@
|
||||
import { ApiProperty } from '@nestjs/swagger'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreateProviderDto {
|
||||
@IsString()
|
||||
@ApiProperty()
|
||||
@ApiProperty({ required: true })
|
||||
name: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty()
|
||||
code?: string
|
||||
code: string
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
username: string
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
password: string
|
||||
}
|
||||
|
||||
export class UpdateProviderDto extends CreateProviderDto {}
|
||||
export class UpdateProviderDto extends PartialType(CreateProviderDto) {}
|
||||
|
||||
Reference in New Issue
Block a user