/**
 * @aurora-catalyst-generated
 * @source cliter/iam/permission.aurora.yaml
 */
import { IamSequelizePermissionRepository } from '@app/iam/permission';
import { HandlerMeta } from '@aurorajs.dev/core-back';
import { Injectable } from '@nestjs/common';

@Injectable()
export class IamCreatePermissionsService {
  constructor(private readonly repository: IamSequelizePermissionRepository) {}

  async main(payload: any[], handlerMeta?: HandlerMeta): Promise<void> {
    await this.repository.insert(payload, {
      insertOptions: handlerMeta?.repositoryOptions,
    });
  }
}
