
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("WorkspaceOwner"), name: "Workspace Owner", createdAt, updatedAt },
        
          { id: getId("FinanceLead"), name: "Finance Lead", createdAt, updatedAt },
        
          { id: getId("FinanceAnalyst"), name: "Finance Analyst", createdAt, updatedAt },
        
          { id: getId("FounderViewer"), name: "Founder Viewer", createdAt, updatedAt },
        
          { id: getId("ExternalAccountant"), name: "External Accountant", 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","workspaces","workspace_memberships","data_connections","financial_accounts","vendors","customers","transactions","budgets","budget_lines","forecasts","forecast_scenarios","metrics_snapshots","anomalies","alerts","recommendations","chat_threads","chat_messages","message_citations","files_library","sync_jobs",,
    ];
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("WorkspaceOwner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_WORKSPACES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_WORKSPACES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_WORKSPACES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_WORKSPACES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_WORKSPACES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_WORKSPACE_MEMBERSHIPS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_WORKSPACE_MEMBERSHIPS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_DATA_CONNECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_DATA_CONNECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_DATA_CONNECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_DATA_CONNECTIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_DATA_CONNECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_DATA_CONNECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_DATA_CONNECTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_DATA_CONNECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_DATA_CONNECTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_DATA_CONNECTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_DATA_CONNECTIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_FINANCIAL_ACCOUNTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_FINANCIAL_ACCOUNTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_VENDORS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_VENDORS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_VENDORS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_CUSTOMERS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_TRANSACTIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_TRANSACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_TRANSACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_TRANSACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_TRANSACTIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_BUDGETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_BUDGETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_BUDGETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_BUDGETS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_BUDGETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_BUDGETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_BUDGETS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_BUDGETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_BUDGETS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_BUDGETS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_BUDGETS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_BUDGET_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_BUDGET_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_BUDGET_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_BUDGET_LINES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_BUDGET_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_BUDGET_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_BUDGET_LINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_BUDGET_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_BUDGET_LINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_BUDGET_LINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_BUDGET_LINES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_FORECASTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_FORECASTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_FORECASTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_FORECASTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_FORECASTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_FORECASTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_FORECASTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_FORECASTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_FORECASTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_FORECASTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_FORECASTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_FORECAST_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_FORECAST_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_FORECAST_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_FORECAST_SCENARIOS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_FORECAST_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_FORECAST_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_FORECAST_SCENARIOS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_FORECAST_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_FORECAST_SCENARIOS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_FORECAST_SCENARIOS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_FORECAST_SCENARIOS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_METRICS_SNAPSHOTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_METRICS_SNAPSHOTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_METRICS_SNAPSHOTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_METRICS_SNAPSHOTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_METRICS_SNAPSHOTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_METRICS_SNAPSHOTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_METRICS_SNAPSHOTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_METRICS_SNAPSHOTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_METRICS_SNAPSHOTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_METRICS_SNAPSHOTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_ANOMALIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_ANOMALIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_ANOMALIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_ANOMALIES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_ANOMALIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_ANOMALIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_ANOMALIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_ANOMALIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_ANOMALIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_ANOMALIES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_ALERTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_ALERTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_ALERTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_ALERTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_ALERTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_ALERTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_ALERTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_ALERTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_ALERTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_ALERTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_ALERTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_RECOMMENDATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_RECOMMENDATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_RECOMMENDATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_RECOMMENDATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_RECOMMENDATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_CHAT_THREADS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_CHAT_THREADS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('CREATE_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_CHAT_THREADS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('READ_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_CHAT_THREADS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('READ_CHAT_THREADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_CHAT_THREADS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_CHAT_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_CHAT_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('CREATE_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_CHAT_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('READ_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_CHAT_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('READ_CHAT_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_CHAT_MESSAGES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_MESSAGE_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_MESSAGE_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_MESSAGE_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_MESSAGE_CITATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_MESSAGE_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_MESSAGE_CITATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_MESSAGE_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_MESSAGE_CITATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_MESSAGE_CITATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_MESSAGE_CITATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_FILES_LIBRARY') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_FILES_LIBRARY') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_FILES_LIBRARY') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_FILES_LIBRARY') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_FILES_LIBRARY') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_FILES_LIBRARY') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_FILES_LIBRARY') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('READ_FILES_LIBRARY') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_FILES_LIBRARY') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_FILES_LIBRARY') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('READ_FILES_LIBRARY') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_FILES_LIBRARY') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_SYNC_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('READ_SYNC_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('UPDATE_SYNC_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('DELETE_SYNC_JOBS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('READ_SYNC_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('UPDATE_SYNC_JOBS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('UPDATE_SYNC_JOBS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('UPDATE_SYNC_JOBS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), permissionId: getId('UPDATE_SYNC_JOBS') },
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceOwner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("FinanceLead"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("FinanceAnalyst"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("FounderViewer"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("ExternalAccountant"), 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_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_WORKSPACES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_WORKSPACE_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_WORKSPACE_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_WORKSPACE_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_WORKSPACE_MEMBERSHIPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DATA_CONNECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DATA_CONNECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DATA_CONNECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DATA_CONNECTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FINANCIAL_ACCOUNTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FINANCIAL_ACCOUNTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FINANCIAL_ACCOUNTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FINANCIAL_ACCOUNTS') },
    
    { 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_CUSTOMERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CUSTOMERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CUSTOMERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CUSTOMERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TRANSACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_BUDGETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_BUDGETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_BUDGETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_BUDGETS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_BUDGET_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_BUDGET_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_BUDGET_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_BUDGET_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FORECASTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FORECASTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FORECASTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FORECASTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FORECAST_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FORECAST_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FORECAST_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FORECAST_SCENARIOS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_METRICS_SNAPSHOTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_METRICS_SNAPSHOTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_METRICS_SNAPSHOTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_METRICS_SNAPSHOTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ANOMALIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ANOMALIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ANOMALIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ANOMALIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ALERTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ALERTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ALERTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ALERTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_RECOMMENDATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CHAT_THREADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CHAT_THREADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CHAT_THREADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CHAT_THREADS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CHAT_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CHAT_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CHAT_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CHAT_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MESSAGE_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MESSAGE_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MESSAGE_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MESSAGE_CITATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FILES_LIBRARY') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FILES_LIBRARY') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FILES_LIBRARY') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FILES_LIBRARY') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SYNC_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SYNC_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SYNC_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SYNC_JOBS') },
    
    
    
    { 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_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_WORKSPACES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_WORKSPACE_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_WORKSPACE_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_WORKSPACE_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_WORKSPACE_MEMBERSHIPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DATA_CONNECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DATA_CONNECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DATA_CONNECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DATA_CONNECTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_FINANCIAL_ACCOUNTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_FINANCIAL_ACCOUNTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_FINANCIAL_ACCOUNTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_FINANCIAL_ACCOUNTS') },
    
    { 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_CUSTOMERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CUSTOMERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CUSTOMERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CUSTOMERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TRANSACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_BUDGETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_BUDGETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_BUDGETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_BUDGETS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_BUDGET_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_BUDGET_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_BUDGET_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_BUDGET_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_FORECASTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_FORECASTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_FORECASTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_FORECASTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_FORECAST_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_FORECAST_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_FORECAST_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_FORECAST_SCENARIOS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_METRICS_SNAPSHOTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_METRICS_SNAPSHOTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_METRICS_SNAPSHOTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_METRICS_SNAPSHOTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ANOMALIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ANOMALIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ANOMALIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ANOMALIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ALERTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ALERTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ALERTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ALERTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_RECOMMENDATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CHAT_THREADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CHAT_THREADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CHAT_THREADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CHAT_THREADS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CHAT_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CHAT_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CHAT_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CHAT_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MESSAGE_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MESSAGE_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MESSAGE_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MESSAGE_CITATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_FILES_LIBRARY') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_FILES_LIBRARY') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_FILES_LIBRARY') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_FILES_LIBRARY') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SYNC_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SYNC_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SYNC_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SYNC_JOBS') },
    
    
    
    { 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("WorkspaceOwner")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("FinanceLead")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

