
const { v4: uuid } = require("uuid");

module.exports = {
  /**
   * @param{import("sequelize").QueryInterface} queryInterface
   * @return {Promise<void>}
   */
  async up(queryInterface) {
    const createdAt = new Date();
    const updatedAt = new Date();

    /** @type {Map<string, string>} */
    const idMap = new Map();

    /**
     * @param {string} key
     * @return {string}
     */
    function getId(key) {
      if (idMap.has(key)) {
        return idMap.get(key);
      }
      const id = uuid();
      idMap.set(key, id);
      return id;
    }

    await queryInterface.bulkInsert("roles", [
      
      { id: getId("SuperAdmin"), name: "Super Administrator", createdAt, updatedAt },
      
      
      { id: getId("Administrator"), name: "Administrator", createdAt, updatedAt },
      
      
        
          { id: getId("OperationsDirector"), name: "Operations Director", createdAt, updatedAt },
        
          { id: getId("BusinessUnitManager"), name: "Business Unit Manager", createdAt, updatedAt },
        
          { id: getId("SalesLead"), name: "Sales Lead", createdAt, updatedAt },
        
          { id: getId("ProductionPlanner"), name: "Production Planner", createdAt, updatedAt },
        
          { id: getId("EventCoordinator"), name: "Event Coordinator", createdAt, updatedAt },
        
      
      
      { id: getId("Public"), name: "Public", createdAt, updatedAt },
    ]);

    /**
     * @param {string} name
     */
    function createPermissions(name) {
      return [
        { id: getId(`CREATE_${name.toUpperCase()}`), createdAt, updatedAt, name: `CREATE_${name.toUpperCase()}` },
        { id: getId(`READ_${name.toUpperCase()}`), createdAt, updatedAt, name: `READ_${name.toUpperCase()}` },
        { id: getId(`UPDATE_${name.toUpperCase()}`), createdAt, updatedAt, name: `UPDATE_${name.toUpperCase()}` },
        { id: getId(`DELETE_${name.toUpperCase()}`), createdAt, updatedAt, name: `DELETE_${name.toUpperCase()}` }
      ];
    }

    const entities = [
      "users","roles","permissions","organizations","companies","contacts","pipelines","pipeline_stages","leads","deals","activities","materials","warehouses","inventory_items","machines","production_orders","production_operations","quality_inspections","nonconformances","vendors","venues","events","event_tasks","event_guests","event_schedule_items","budget_items",,
    ];
await queryInterface.bulkInsert("permissions", entities.flatMap(createPermissions));
await queryInterface.bulkInsert("permissions", [{ id: getId(`READ_API_DOCS`), createdAt, updatedAt, name: `READ_API_DOCS` }]);
await queryInterface.bulkInsert("permissions", [{ id: getId(`CREATE_SEARCH`), createdAt, updatedAt, name: `CREATE_SEARCH`}]);

await queryInterface.bulkUpdate('roles', { globalAccess: true }, { id: getId('SuperAdmin') });


await queryInterface.sequelize.query(`create table "rolesPermissionsPermissions"
(
"createdAt"           timestamp with time zone not null,
"updatedAt"           timestamp with time zone not null,
"roles_permissionsId" uuid                     not null,
"permissionId"        uuid                     not null,
primary key ("roles_permissionsId", "permissionId")
);`);


await queryInterface.bulkInsert("rolesPermissionsPermissions", [
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_COMPANIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_COMPANIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_COMPANIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_COMPANIES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_COMPANIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_COMPANIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_COMPANIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('CREATE_COMPANIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_COMPANIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_COMPANIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_COMPANIES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_COMPANIES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_CONTACTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_CONTACTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('CREATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_CONTACTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_PIPELINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_PIPELINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_PIPELINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_PIPELINES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_PIPELINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_PIPELINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_PIPELINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_PIPELINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_PIPELINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_PIPELINES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_PIPELINES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_PIPELINE_STAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_PIPELINE_STAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_PIPELINE_STAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_PIPELINE_STAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_PIPELINE_STAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_PIPELINE_STAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_PIPELINE_STAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_PIPELINE_STAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_PIPELINE_STAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_PIPELINE_STAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_PIPELINE_STAGES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_LEADS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_LEADS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('CREATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_LEADS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_DEALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_DEALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_DEALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_DEALS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_DEALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_DEALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_DEALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('CREATE_DEALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_DEALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_DEALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_DEALS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_DEALS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_ACTIVITIES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_ACTIVITIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('CREATE_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('UPDATE_ACTIVITIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_ACTIVITIES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_ACTIVITIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_ACTIVITIES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_MATERIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_MATERIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_MATERIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_MATERIALS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_MATERIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_MATERIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_MATERIALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_MATERIALS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_MATERIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_MATERIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_MATERIALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_MATERIALS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_WAREHOUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_WAREHOUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_WAREHOUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_WAREHOUSES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_WAREHOUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_WAREHOUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_WAREHOUSES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_WAREHOUSES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_WAREHOUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_WAREHOUSES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_WAREHOUSES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_INVENTORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_INVENTORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_INVENTORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_INVENTORY_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_INVENTORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_INVENTORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_INVENTORY_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_INVENTORY_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_INVENTORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_INVENTORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_INVENTORY_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_INVENTORY_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_MACHINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_MACHINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_MACHINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_MACHINES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_MACHINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_MACHINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_MACHINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_MACHINES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_MACHINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_MACHINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_MACHINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_MACHINES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_PRODUCTION_ORDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_PRODUCTION_ORDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_PRODUCTION_ORDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_PRODUCTION_ORDERS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_PRODUCTION_ORDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_PRODUCTION_ORDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_PRODUCTION_ORDERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_PRODUCTION_ORDERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_PRODUCTION_ORDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_PRODUCTION_ORDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_PRODUCTION_ORDERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_PRODUCTION_ORDERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_PRODUCTION_OPERATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_PRODUCTION_OPERATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_PRODUCTION_OPERATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_PRODUCTION_OPERATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_PRODUCTION_OPERATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_PRODUCTION_OPERATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_PRODUCTION_OPERATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_PRODUCTION_OPERATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_PRODUCTION_OPERATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_PRODUCTION_OPERATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_PRODUCTION_OPERATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_PRODUCTION_OPERATIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_QUALITY_INSPECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_QUALITY_INSPECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_QUALITY_INSPECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_QUALITY_INSPECTIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_QUALITY_INSPECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_QUALITY_INSPECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_QUALITY_INSPECTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_QUALITY_INSPECTIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_QUALITY_INSPECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_QUALITY_INSPECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_QUALITY_INSPECTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_QUALITY_INSPECTIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_NONCONFORMANCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_NONCONFORMANCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_NONCONFORMANCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_NONCONFORMANCES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_NONCONFORMANCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_NONCONFORMANCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_NONCONFORMANCES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_NONCONFORMANCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_NONCONFORMANCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_NONCONFORMANCES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_NONCONFORMANCES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_VENDORS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('CREATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_VENUES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_VENUES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_VENUES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_VENUES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_VENUES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_VENUES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_VENUES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_VENUES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_VENUES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_VENUES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_VENUES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_VENUES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_EVENTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_EVENT_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_EVENT_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_EVENT_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_EVENT_TASKS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_EVENT_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_EVENT_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_EVENT_TASKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_EVENT_TASKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_EVENT_TASKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_EVENT_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_EVENT_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_EVENT_TASKS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_EVENT_GUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_EVENT_GUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_EVENT_GUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_EVENT_GUESTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_EVENT_GUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_EVENT_GUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_EVENT_GUESTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_EVENT_GUESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_EVENT_GUESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_EVENT_GUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_EVENT_GUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_EVENT_GUESTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_EVENT_SCHEDULE_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_EVENT_SCHEDULE_ITEMS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_BUDGET_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('READ_BUDGET_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('UPDATE_BUDGET_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('DELETE_BUDGET_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_BUDGET_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('READ_BUDGET_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('UPDATE_BUDGET_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('READ_BUDGET_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('READ_BUDGET_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_BUDGET_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('READ_BUDGET_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('UPDATE_BUDGET_ITEMS') },
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("OperationsDirector"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("BusinessUnitManager"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("SalesLead"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("ProductionPlanner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("EventCoordinator"), permissionId: getId('CREATE_SEARCH') },
        
      
      
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_COMPANIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONTACTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PIPELINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PIPELINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PIPELINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PIPELINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PIPELINE_STAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PIPELINE_STAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PIPELINE_STAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PIPELINE_STAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_LEADS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DEALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DEALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DEALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DEALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ACTIVITIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ACTIVITIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ACTIVITIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ACTIVITIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MATERIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MATERIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MATERIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MATERIALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_WAREHOUSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_INVENTORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_INVENTORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_INVENTORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_INVENTORY_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MACHINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MACHINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MACHINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MACHINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PRODUCTION_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PRODUCTION_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PRODUCTION_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PRODUCTION_ORDERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PRODUCTION_OPERATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PRODUCTION_OPERATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PRODUCTION_OPERATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PRODUCTION_OPERATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_QUALITY_INSPECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_QUALITY_INSPECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_QUALITY_INSPECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_QUALITY_INSPECTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_NONCONFORMANCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_NONCONFORMANCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_NONCONFORMANCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_NONCONFORMANCES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_VENDORS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_VENUES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_VENUES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_VENUES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_VENUES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EVENT_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EVENT_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EVENT_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EVENT_TASKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EVENT_GUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EVENT_GUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EVENT_GUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EVENT_GUESTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EVENT_SCHEDULE_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EVENT_SCHEDULE_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EVENT_SCHEDULE_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EVENT_SCHEDULE_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_BUDGET_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_BUDGET_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_BUDGET_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_BUDGET_ITEMS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ROLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PERMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ORGANIZATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_COMPANIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CONTACTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PIPELINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PIPELINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PIPELINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PIPELINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PIPELINE_STAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PIPELINE_STAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PIPELINE_STAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PIPELINE_STAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_LEADS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DEALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DEALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DEALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DEALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ACTIVITIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ACTIVITIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ACTIVITIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ACTIVITIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MATERIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MATERIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MATERIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MATERIALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_WAREHOUSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_INVENTORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_INVENTORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_INVENTORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_INVENTORY_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MACHINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MACHINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MACHINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MACHINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PRODUCTION_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PRODUCTION_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PRODUCTION_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PRODUCTION_ORDERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PRODUCTION_OPERATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PRODUCTION_OPERATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PRODUCTION_OPERATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PRODUCTION_OPERATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_QUALITY_INSPECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_QUALITY_INSPECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_QUALITY_INSPECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_QUALITY_INSPECTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_NONCONFORMANCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_NONCONFORMANCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_NONCONFORMANCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_NONCONFORMANCES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_VENDORS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_VENUES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_VENUES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_VENUES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_VENUES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EVENT_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EVENT_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EVENT_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EVENT_TASKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EVENT_GUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EVENT_GUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EVENT_GUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EVENT_GUESTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EVENT_SCHEDULE_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EVENT_SCHEDULE_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EVENT_SCHEDULE_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EVENT_SCHEDULE_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_BUDGET_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_BUDGET_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_BUDGET_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_BUDGET_ITEMS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_API_DOCS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SEARCH') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_API_DOCS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SEARCH') },
    ]);


  await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("SuperAdmin")}' WHERE "email"='super_admin@flatlogic.com'`);
  await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("Administrator")}' WHERE "email"='admin@flatlogic.com'`);
  
   
      
      
        
        
           await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("OperationsDirector")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("BusinessUnitManager")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

