import { BaseStatusDto } from 'src/core/modules/infrastructure/dto/base-status.dto';
import { ItemCategoryEntity } from '../../domain/entities/item-category.entity';
import { IsString } from 'class-validator';
import { ItemType } from '../../constants';
import { ApiProperty } from '@nestjs/swagger';

export class ItemCategoryDto
  extends BaseStatusDto
  implements ItemCategoryEntity
{
  @ApiProperty({ name: 'name', required: true, example: 'Bundling w Entrance' })
  @IsString()
  name: string;

  @ApiProperty({
    type: 'string',
    required: true,
    description: `Select (${JSON.stringify(Object.values(ItemType))})`,
    example: ItemType.BUNDLING,
  })
  item_type: ItemType;
}
