File

src/order/http/response/order.response.ts

Extends

BaseEntityResponse

Index

Properties

Properties

creatorId
Type : string | null
Decorators :
@ApiPropertyOptional()
@IsUUID()
facilityId
Type : string | null
Decorators :
@ApiPropertyOptional()
@IsUUID()
invoiceNumber
Type : string | null
Decorators :
@ApiPropertyOptional()
@IsOptional()
@IsString()
packingListNumber
Type : string | null
Decorators :
@ApiPropertyOptional()
@IsOptional()
@IsString()
productDescription
Type : string
Decorators :
@ApiProperty()
@IsString()
@IsNotEmpty()
purchasedAt
Type : Date | number | null
Decorators :
@ApiPropertyOptional({type: Number, example: 1662704035})
@IsOptional()
@IsInt()
purchaseOrderNumber
Type : string
Decorators :
@ApiProperty()
@IsString()
@IsNotEmpty()
quantity
Type : string
Decorators :
@ApiProperty()
@IsString()
@IsNotEmpty()
supplierId
Type : string | null
Decorators :
@ApiPropertyOptional()
@IsUUID()
createdAt
Type : number
Decorators :
@ApiProperty()
@IsNumber()
Inherited from BaseEntityResponse
id
Type : string
Decorators :
@ApiProperty()
@IsUUID()
Inherited from BaseEntityResponse
updatedAt
Type : number
Decorators :
@ApiProperty()
@IsNumber()
Inherited from BaseEntityResponse
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsInt, IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator';
import { BaseEntityResponse } from '~core/http/response/base-entity.response';

export class OrderResponse extends BaseEntityResponse {
    @ApiProperty()
    @IsString()
    @IsNotEmpty()
    purchaseOrderNumber: string;

    @ApiPropertyOptional({
        type: Number,
        example: 1662704035
    })
    @IsOptional()
    @IsInt()
    purchasedAt: Date | number | null;

    @ApiProperty()
    @IsString()
    @IsNotEmpty()
    productDescription: string;

    @ApiProperty()
    @IsString()
    @IsNotEmpty()
    quantity: string;

    @ApiPropertyOptional()
    @IsOptional()
    @IsString()
    invoiceNumber: string | null;

    @ApiPropertyOptional()
    @IsOptional()
    @IsString()
    packingListNumber: string | null;

    @ApiPropertyOptional()
    @IsUUID()
    creatorId: string | null;

    @ApiPropertyOptional()
    @IsUUID()
    facilityId: string | null;

    @ApiPropertyOptional()
    @IsUUID()
    supplierId: string | null;
}

results matching ""

    No results matching ""