import { BaseStatusDto } from 'src/core/modules/infrastructure/dto/base-status.dto'; import { GateEntity } from '../../domain/entities/gate.entity'; import { GateType } from '../../constants'; import { ApiProperty } from '@nestjs/swagger'; import { IsObject, IsString } from 'class-validator'; import { Exclude } from 'class-transformer'; import { ItemEntity } from 'src/modules/item-related/item/domain/entities/item.entity'; export class GateDto extends BaseStatusDto implements GateEntity { @ApiProperty({ type: String, required: true, example: GateType.GATE_IN, }) @IsString() type: GateType; @ApiProperty({ type: String, required: true, example: '41245', }) code: string; @ApiProperty({ type: String, required: false, example: '41245', }) note: string; @ApiProperty({ type: Object, required: true, example: { id: 'uuid', name: 'whana', }, }) @IsObject() item: ItemEntity; @Exclude() item_id: string; }