import { ApiProperty, PartialType } from '@nestjs/swagger';
import { CreateProductDto } from './create-product.dto';

// import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsString } from 'class-validator';

export class UpdateProductDto extends PartialType(CreateProductDto) {
    @ApiProperty()
    @IsString({
        message: 'id must be a number',
    })
    id: string;

    @IsOptional()
    title: string;

    @IsOptional()
    description: string;

    @IsOptional()
    price: string;

    @IsOptional()
    stock: number;

    @IsOptional()
    address: string;

    @IsOptional()
    status: string;

    @IsOptional()
    urlImg: string;

    // @ApiProperty()
    // @IsString({
    //     message: 'userId must be a number',
    // })
    // userId: number;
}
