File

src/modules/partner/dtos/partner.dto.ts

Extends

AbstractDto

Index

Properties

Constructor

constructor(partner: PartnerEntity)
Parameters :
Name Type Optional
partner PartnerEntity No

Properties

Readonly Optional address
Type : string
Decorators :
@ApiProperty()
Readonly Optional contact
Type : string
Decorators :
@ApiProperty()
Readonly Optional email
Type : string
Decorators :
@ApiProperty()
Readonly name
Type : string
Decorators :
@ApiProperty()
Readonly uuid
Type : string
Inherited from AbstractDto
Defined in AbstractDto:4
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional } from 'class-validator';
import { AbstractDto } from 'common/dtos';
import { PartnerUserDto } from './partner-user.dto'
import { PartnerEntity } from 'modules/partner/entities';

export class PartnerDto extends AbstractDto {
  @ApiProperty()
  readonly name: string;

  @ApiProperty()
  readonly email?: string;

  @ApiProperty()
  readonly contact?: string;

  @ApiProperty()
  readonly address?: string;

  constructor(partner: PartnerEntity) {
    super(partner);
    this.name = partner.name;
    this.email = partner.email;
    this.contact = partner.contact;
    this.address = partner.address;
  }
}

result-matching ""

    No results matching ""