
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("PlatformOwner"), name: "PlatformOwner", createdAt, updatedAt },
        
          { id: getId("FirmOwner"), name: "FirmOwner", createdAt, updatedAt },
        
          { id: getId("SeniorAccountant"), name: "SeniorAccountant", createdAt, updatedAt },
        
          { id: getId("Accountant"), name: "Accountant", createdAt, updatedAt },
        
          { id: getId("MerchantUser"), name: "MerchantUser", 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","firms","merchants","customers","suppliers","products","receipts","ocr_extractions","sales_invoices","sales_invoice_lines","purchase_invoices","purchase_invoice_lines","expenses","tax_periods","vat_declarations","tot_declarations","declaration_submissions","messages","audit_events",,
    ];
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("PlatformOwner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_FIRMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_FIRMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_FIRMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_FIRMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_FIRMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_FIRMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_FIRMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_FIRMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_MERCHANTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_MERCHANTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_MERCHANTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_MERCHANTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_MERCHANTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_MERCHANTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CUSTOMERS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_CUSTOMERS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_CUSTOMERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_CUSTOMERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_CUSTOMERS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SUPPLIERS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_SUPPLIERS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_SUPPLIERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_SUPPLIERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_SUPPLIERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_SUPPLIERS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_PRODUCTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_PRODUCTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_PRODUCTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_PRODUCTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_PRODUCTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_PRODUCTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_RECEIPTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_RECEIPTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_RECEIPTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_RECEIPTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_RECEIPTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_RECEIPTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_OCR_EXTRACTIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_OCR_EXTRACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_OCR_EXTRACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_OCR_EXTRACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_OCR_EXTRACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_OCR_EXTRACTIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SALES_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_SALES_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_SALES_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_SALES_INVOICES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_SALES_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_SALES_INVOICES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SALES_INVOICE_LINES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_SALES_INVOICE_LINES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_SALES_INVOICE_LINES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_SALES_INVOICE_LINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_SALES_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_SALES_INVOICE_LINES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_PURCHASE_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_PURCHASE_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_PURCHASE_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_PURCHASE_INVOICES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_PURCHASE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_PURCHASE_INVOICES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_PURCHASE_INVOICE_LINES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_PURCHASE_INVOICE_LINES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_PURCHASE_INVOICE_LINES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_PURCHASE_INVOICE_LINES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_EXPENSES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_EXPENSES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_EXPENSES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_EXPENSES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_EXPENSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_EXPENSES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TAX_PERIODS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_TAX_PERIODS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_TAX_PERIODS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_TAX_PERIODS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_TAX_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_TAX_PERIODS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_VAT_DECLARATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_VAT_DECLARATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_VAT_DECLARATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_VAT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_VAT_DECLARATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_VAT_DECLARATIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TOT_DECLARATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_TOT_DECLARATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_TOT_DECLARATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_TOT_DECLARATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_TOT_DECLARATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_TOT_DECLARATIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_DECLARATION_SUBMISSIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_DECLARATION_SUBMISSIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_AUDIT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_AUDIT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_AUDIT_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('UPDATE_AUDIT_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("FirmOwner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("SeniorAccountant"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("Accountant"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("MerchantUser"), 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_FIRMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FIRMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FIRMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FIRMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MERCHANTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MERCHANTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MERCHANTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MERCHANTS') },
    
    { 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_SUPPLIERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SUPPLIERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SUPPLIERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SUPPLIERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PRODUCTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PRODUCTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PRODUCTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PRODUCTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_RECEIPTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_OCR_EXTRACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_OCR_EXTRACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_OCR_EXTRACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_OCR_EXTRACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SALES_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SALES_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SALES_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SALES_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SALES_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SALES_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SALES_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SALES_INVOICE_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PURCHASE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PURCHASE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PURCHASE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PURCHASE_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PURCHASE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PURCHASE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PURCHASE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PURCHASE_INVOICE_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EXPENSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EXPENSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EXPENSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EXPENSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TAX_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TAX_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TAX_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TAX_PERIODS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_VAT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_VAT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_VAT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_VAT_DECLARATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TOT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TOT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TOT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TOT_DECLARATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DECLARATION_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DECLARATION_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DECLARATION_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DECLARATION_SUBMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_AUDIT_EVENTS') },
    
    
    
    { 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_FIRMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_FIRMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_FIRMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_FIRMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MERCHANTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MERCHANTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MERCHANTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MERCHANTS') },
    
    { 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_SUPPLIERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SUPPLIERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SUPPLIERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SUPPLIERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PRODUCTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PRODUCTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PRODUCTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PRODUCTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_RECEIPTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_OCR_EXTRACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_OCR_EXTRACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_OCR_EXTRACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_OCR_EXTRACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SALES_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SALES_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SALES_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SALES_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SALES_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SALES_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SALES_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SALES_INVOICE_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PURCHASE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PURCHASE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PURCHASE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PURCHASE_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PURCHASE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PURCHASE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PURCHASE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PURCHASE_INVOICE_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EXPENSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EXPENSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EXPENSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EXPENSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TAX_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TAX_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TAX_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TAX_PERIODS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_VAT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_VAT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_VAT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_VAT_DECLARATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TOT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TOT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TOT_DECLARATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TOT_DECLARATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DECLARATION_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DECLARATION_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DECLARATION_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DECLARATION_SUBMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_AUDIT_EVENTS') },
    
    
    
    { 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("PlatformOwner")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("FirmOwner")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

