feat: Introduce agent types module, replacing categories and verification modules, and updating agent-related DTOs, services, and Prisma schema.
This commit is contained in:
@@ -2,7 +2,6 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsString,
|
||||
IsOptional,
|
||||
IsArray,
|
||||
IsInt,
|
||||
IsUrl,
|
||||
IsUUID,
|
||||
@@ -13,6 +12,14 @@ import {
|
||||
} from 'class-validator';
|
||||
|
||||
export class CreateAgentProfileDto {
|
||||
@ApiPropertyOptional({
|
||||
example: 'uuid-agent-type-id',
|
||||
description: 'Agent type ID (Professional, Lender, Advisor, etc.)',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsUUID('4')
|
||||
agentTypeId?: string;
|
||||
|
||||
@ApiProperty({ example: 'John' })
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
@@ -116,13 +123,4 @@ export class CreateAgentProfileDto {
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
instagramUrl?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: ['uuid-1', 'uuid-2'],
|
||||
description: 'Array of specialization IDs',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@IsUUID('4', { each: true })
|
||||
specializationIds?: string[];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
IsBoolean,
|
||||
IsInt,
|
||||
IsUUID,
|
||||
IsArray,
|
||||
Min,
|
||||
Max,
|
||||
} from 'class-validator';
|
||||
@@ -32,20 +31,13 @@ export class SearchAgentsDto {
|
||||
@IsString()
|
||||
country?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'uuid-of-category' })
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
categoryId?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: ['uuid-1', 'uuid-2'],
|
||||
description: 'Filter by specialization IDs',
|
||||
example: 'uuid-of-agent-type',
|
||||
description: 'Filter by agent type ID',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@IsUUID('4', { each: true })
|
||||
@Transform(({ value }) => (typeof value === 'string' ? [value] : value))
|
||||
specializationIds?: string[];
|
||||
@IsUUID()
|
||||
agentTypeId?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: true })
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user