import { SetMetadata } from '@nestjs/common';

export const REQUIRE_SYSTEM_ADMIN_METADATA_KEY = 'gridpilot:requireSystemAdmin';

export type RequireSystemAdminMetadata = {
  readonly required: true;
};

export function RequireSystemAdmin(): MethodDecorator & ClassDecorator {
  return SetMetadata(REQUIRE_SYSTEM_ADMIN_METADATA_KEY, {
    required: true,
  } satisfies RequireSystemAdminMetadata);
}