import { ApiProperty } from '@nestjs/swagger';
import { ArrayNotEmpty, IsArray, IsInt, IsPositive } from 'class-validator';

export class AssignPermissionsDto {
  @ApiProperty({
    type: [Number],
    example: [1, 2],
    description: 'IDs of the permissions to grant directly to the user',
  })
  @IsArray()
  @ArrayNotEmpty()
  @IsInt({ each: true })
  @IsPositive({ each: true })
  permissionIds!: number[];
}
