forked from Yara724/api
116 lines
2.4 KiB
TypeScript
116 lines
2.4 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
import { IsEmail, IsNotEmpty, IsOptional, IsString } from "class-validator";
|
|
|
|
export class CreateSuperAdminDto {
|
|
@ApiProperty({
|
|
example: "ops@yara724.ir",
|
|
description: "Email address for the new super-admin account.",
|
|
})
|
|
@IsEmail()
|
|
email: string;
|
|
|
|
@ApiProperty({ example: "Str0ngP@ss!" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
password: string;
|
|
|
|
@ApiPropertyOptional({ example: "Operations" })
|
|
@IsOptional()
|
|
@IsString()
|
|
firstName?: string;
|
|
|
|
@ApiPropertyOptional({ example: "Team" })
|
|
@IsOptional()
|
|
@IsString()
|
|
lastName?: string;
|
|
}
|
|
|
|
export class CreateFieldExpertAdminDto {
|
|
@ApiProperty({ example: "expert@insurer.ir" })
|
|
@IsEmail()
|
|
email: string;
|
|
|
|
@ApiProperty({ example: "Expert@724" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
password: string;
|
|
|
|
@ApiProperty({ example: "Ali" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
firstName: string;
|
|
|
|
@ApiProperty({ example: "Mohammadi" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
lastName: string;
|
|
|
|
@ApiProperty({ example: "09121234567" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
mobile: string;
|
|
|
|
@ApiPropertyOptional({ example: "02112345678" })
|
|
@IsOptional()
|
|
@IsString()
|
|
phone?: string;
|
|
}
|
|
|
|
export class CreateRegistrarAdminDto {
|
|
@ApiProperty({ example: "registrar@insurer.ir" })
|
|
@IsEmail()
|
|
email: string;
|
|
|
|
@ApiProperty({ example: "Registrar@724" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
password: string;
|
|
|
|
@ApiProperty({
|
|
example: "664a1b2c3d4e5f6789012345",
|
|
description: "Mongo ObjectId of the insurer client this registrar belongs to.",
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
clientId: string;
|
|
}
|
|
|
|
export class CreateFinancialExpertAdminDto {
|
|
@ApiProperty({ example: "financial@insurer.ir" })
|
|
@IsEmail()
|
|
email: string;
|
|
|
|
@ApiProperty({ example: "FinExpert@724" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
password: string;
|
|
|
|
@ApiProperty({ example: "Ali" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
firstName: string;
|
|
|
|
@ApiProperty({ example: "Mohammadi" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
lastName: string;
|
|
|
|
@ApiProperty({ example: "09121234567" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
mobile: string;
|
|
|
|
@ApiProperty({
|
|
example: "664a1b2c3d4e5f6789012345",
|
|
description: "Mongo ObjectId of the insurer client this financial expert belongs to.",
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
clientId: string;
|
|
|
|
@ApiPropertyOptional({ example: "02112345678" })
|
|
@IsOptional()
|
|
@IsString()
|
|
phone?: string;
|
|
}
|