forked from Shared/esg
parsian inquiries implemented
This commit is contained in:
24
src/inquiry/dto/policy-by-plate-request.dto.ts
Normal file
24
src/inquiry/dto/policy-by-plate-request.dto.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNotEmpty, IsString, Matches } from 'class-validator';
|
||||
|
||||
export class PolicyByPlateRequestDto {
|
||||
@ApiProperty({ example: '12', description: 'Two digits on the left side of the plate' })
|
||||
@IsString()
|
||||
@Matches(/^\d{2}$/, { message: 'plk1 must be exactly 2 digits' })
|
||||
plk1!: string;
|
||||
|
||||
@ApiProperty({ example: 'ب', description: 'Middle plate letter' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
plk2!: string;
|
||||
|
||||
@ApiProperty({ example: '345', description: 'Three digits on the right side of the plate' })
|
||||
@IsString()
|
||||
@Matches(/^\d{3}$/, { message: 'plk3 must be exactly 3 digits' })
|
||||
plk3!: string;
|
||||
|
||||
@ApiProperty({ example: '67', description: 'Plate serial' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
plksrl!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user