import { IsString, IsOptional, IsEnum, MaxLength } from 'class-validator';
import { PartialType } from '@nestjs/mapped-types';
import { SettingStatus } from 'generated/prisma/client'

export class CreateItemTypeDto {
  @IsString()
  @MaxLength(50)
  code: string;

  @IsString()
  @MaxLength(100)
  name: string;

  @IsOptional()
  @IsString()
  desc?: string;

  @IsOptional()
  @IsEnum(SettingStatus)
  status?: SettingStatus;
}

export class UpdateItemTypeDto extends PartialType(CreateItemTypeDto) {}