import { IsBoolean, IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator';

/**
 * CreateRoleDto — per scope doc (Role Management):
 * Custom roles with granular per-module permissions.
 */
export class CreateRoleDto {
  @IsString()
  @IsNotEmpty()
  name: string;

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

  /** Omitted or null = top of the tree. */
  @IsOptional()
  @IsUUID()
  parent_role_id?: string | null;

  /** Expand query/booking row visibility when user has module view permission. */
  @IsBoolean()
  @IsOptional()
  view_all_bookings_queries?: boolean;
}
