File

src/people/dtos/response/get-person.dto.ts

Description

Data Transfer Object for the response of a single person. This DTO extends the PersonDto and includes additional properties such as a list of titles associated with the person.

Extends

PersonDto

Index

Properties

Properties

titlePersons
Type : TitlePersonDto[] | null
Decorators :
@ApiProperty({description: 'List of titles associated with the person', type: undefined, nullable: true})

List of titles associated with the person

birthDate
Type : string
Decorators :
@ApiProperty({description: 'Birth date of the person in ISO format', name: 'birthDate', type: 'string', required: true})
Inherited from PersonDto
Defined in PersonDto:66

Birth date of the person in ISO format

birthPlace
Type : string
Decorators :
@ApiProperty({description: 'Place of birth of the person', name: 'birthPlace', type: 'string', required: true})
Inherited from PersonDto
Defined in PersonDto:91

Place of birth of the person

deathDate
Type : string | null
Decorators :
@ApiProperty({description: 'Death date of the person in ISO format, null if alive', name: 'deathDate', type: 'string', required: false, nullable: true})
Inherited from PersonDto
Defined in PersonDto:79

Death date of the person in ISO format

id
Type : number
Decorators :
@ApiProperty({description: 'Unique identifier for the person', name: 'id', type: 'number', required: true})
Inherited from PersonDto
Defined in PersonDto:18

Unique identifier for the person

imageUrl
Type : string
Decorators :
@ApiProperty({description: 'Image URL of the person', name: 'imageUrl', type: 'string', required: true})
Inherited from PersonDto
Defined in PersonDto:103

image URL of the person

nameEn
Type : string
Decorators :
@ApiProperty({description: 'Name of the person in English', name: 'nameEn', type: 'string', required: true})
Inherited from PersonDto
Defined in PersonDto:42

Name of the person in English

nameFa
Type : string
Decorators :
@ApiProperty({description: 'Name of the person in Persian', name: 'nameFa', type: 'string', required: true})
Inherited from PersonDto
Defined in PersonDto:30

Name of the person in Persian

slug
Type : string
Decorators :
@ApiProperty({description: 'Slug for the person, used in URLs', name: 'slug', type: 'string', required: true})
Inherited from PersonDto
Defined in PersonDto:54

Slug for the person, used in URLs

import { TitlePersonDto } from 'src/titles/dtos/helper/title-person.dto';
import { PersonDto } from '../helper/person.dto';
import { ApiProperty } from '@nestjs/swagger';

/**
 * Data Transfer Object for the response of a single person.
 * This DTO extends the PersonDto and includes additional properties
 * such as a list of titles associated with the person.
 */
export class GetPersonResponseDto extends PersonDto {
  /**
   * List of titles associated with the person
   * @type {TitlePersonDto[]}
   */
  @ApiProperty({
    description: 'List of titles associated with the person',
    type: [TitlePersonDto],
    nullable: true,
  })
  titlePersons: TitlePersonDto[] | null;
}

results matching ""

    No results matching ""