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

export class CreateTagGroupDto {
  @ApiProperty()
  @IsString()
  groupName!: string;

  @ApiProperty({ required: false, nullable: true })
  @IsOptional()
  @IsString()
  groupIcon?: string;

  @ApiProperty({ required: false, nullable: true, description: 'Hex color' })
  @IsOptional()
  @IsHexColor()
  groupColor?: string;

  @ApiProperty({ required: false, default: 0 })
  @IsOptional()
  @IsInt()
  @Min(0)
  sortOrder?: number;
}
