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

export class UpdateTagDto {
  @ApiProperty({ required: false })
  @IsOptional()
  @IsString()
  tagName?: string;

  @ApiProperty({ required: false, nullable: true })
  @IsOptional()
  @IsHexColor()
  tagColor?: string | null;

  @ApiProperty({ required: false, nullable: true })
  @IsOptional()
  @IsHexColor()
  tagFontColor?: string | null;

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

  @ApiProperty({ required: false, nullable: true, description: 'Tag group ID' })
  @IsOptional()
  @IsInt()
  @Min(1)
  tagGroupId?: number | null;

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