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

@Injectable()
export class IamCreateRolesService {
  constructor(private readonly repository: IamSequelizeRoleRepository) {}

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