import { IsIn, IsNotEmpty, IsOptional, IsString, Matches, MaxLength } from 'class-validator';

export class OpsTagDto {
    @IsString()
    @IsNotEmpty()
    @MaxLength(50)
    @Matches(/^[a-zA-Z0-9_-]+$/)
    tag: string;

    @IsOptional()
    @IsString()
    @IsIn(['a', 'r'])
    mode?: 'a' | 'r';
}
