
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("User"), name: "User", createdAt, updatedAt },
      
      
      { id: getId("Public"), name: "Public", createdAt, updatedAt },
    ]);

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

    const entities = [
      "users","roles","permissions","organizations","companies","user_role_assignments","role_permission_mappings","vendors","warehouses","product_categories","products","purchase_requisitions","purchase_requisition_lines","purchase_orders","purchase_order_lines","goods_receipts","goods_receipt_lines","vendor_invoices","invoice_lines","payments","departments","document_types","documents","document_links","approval_workflows","approval_steps","approvals","activity_logs","ui_announcements",,
    ];
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("User"), permissionId: getId('CREATE_USERS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_USERS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_USERS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_USERS') },
          
    
  
    
    
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_COMPANIES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_COMPANIES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_COMPANIES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_COMPANIES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_USER_ROLE_ASSIGNMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_USER_ROLE_ASSIGNMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_USER_ROLE_ASSIGNMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_USER_ROLE_ASSIGNMENTS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_ROLE_PERMISSION_MAPPINGS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_ROLE_PERMISSION_MAPPINGS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_ROLE_PERMISSION_MAPPINGS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_ROLE_PERMISSION_MAPPINGS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_VENDORS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_VENDORS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_VENDORS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_VENDORS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_WAREHOUSES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_WAREHOUSES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_WAREHOUSES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_WAREHOUSES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_PRODUCT_CATEGORIES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_PRODUCT_CATEGORIES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_PRODUCT_CATEGORIES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_PRODUCT_CATEGORIES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_PRODUCTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_PRODUCTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_PRODUCTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_PRODUCTS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_PURCHASE_REQUISITIONS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_PURCHASE_REQUISITIONS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_PURCHASE_REQUISITIONS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_PURCHASE_REQUISITIONS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_PURCHASE_REQUISITION_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_PURCHASE_REQUISITION_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_PURCHASE_REQUISITION_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_PURCHASE_REQUISITION_LINES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_PURCHASE_ORDERS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_PURCHASE_ORDERS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_PURCHASE_ORDERS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_PURCHASE_ORDERS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_PURCHASE_ORDER_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_PURCHASE_ORDER_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_PURCHASE_ORDER_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_PURCHASE_ORDER_LINES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_GOODS_RECEIPTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_GOODS_RECEIPTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_GOODS_RECEIPTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_GOODS_RECEIPTS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_GOODS_RECEIPT_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_GOODS_RECEIPT_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_GOODS_RECEIPT_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_GOODS_RECEIPT_LINES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_VENDOR_INVOICES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_VENDOR_INVOICES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_VENDOR_INVOICES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_VENDOR_INVOICES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_INVOICE_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_INVOICE_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_INVOICE_LINES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_INVOICE_LINES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_PAYMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_PAYMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_PAYMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_PAYMENTS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_DEPARTMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_DEPARTMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_DEPARTMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_DEPARTMENTS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_DOCUMENT_TYPES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_DOCUMENT_TYPES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_DOCUMENT_TYPES') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_DOCUMENT_TYPES') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_DOCUMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_DOCUMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_DOCUMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_DOCUMENTS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_DOCUMENT_LINKS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_DOCUMENT_LINKS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_DOCUMENT_LINKS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_DOCUMENT_LINKS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_APPROVAL_WORKFLOWS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_APPROVAL_WORKFLOWS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_APPROVAL_WORKFLOWS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_APPROVAL_WORKFLOWS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_APPROVAL_STEPS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_APPROVAL_STEPS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_APPROVAL_STEPS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_APPROVAL_STEPS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_APPROVALS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_APPROVALS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_APPROVALS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_APPROVALS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_ACTIVITY_LOGS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_ACTIVITY_LOGS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_ACTIVITY_LOGS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_ACTIVITY_LOGS') },
          
    
  
    
    
      
      
           
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_UI_ANNOUNCEMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('READ_UI_ANNOUNCEMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('UPDATE_UI_ANNOUNCEMENTS') },
              { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('DELETE_UI_ANNOUNCEMENTS') },
          
    
  
    
     
  
      
       
         { createdAt, updatedAt, roles_permissionsId: getId("User"), permissionId: getId('CREATE_SEARCH') },
      
      
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_COMPANIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USER_ROLE_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USER_ROLE_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USER_ROLE_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USER_ROLE_ASSIGNMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ROLE_PERMISSION_MAPPINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ROLE_PERMISSION_MAPPINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ROLE_PERMISSION_MAPPINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ROLE_PERMISSION_MAPPINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_VENDORS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_WAREHOUSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PRODUCT_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PRODUCT_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PRODUCT_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PRODUCT_CATEGORIES') },
    
    { 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_PURCHASE_REQUISITIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PURCHASE_REQUISITIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PURCHASE_REQUISITIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PURCHASE_REQUISITIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PURCHASE_REQUISITION_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PURCHASE_REQUISITION_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PURCHASE_REQUISITION_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PURCHASE_REQUISITION_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PURCHASE_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PURCHASE_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PURCHASE_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PURCHASE_ORDERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PURCHASE_ORDER_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PURCHASE_ORDER_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PURCHASE_ORDER_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PURCHASE_ORDER_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GOODS_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GOODS_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GOODS_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GOODS_RECEIPTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GOODS_RECEIPT_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GOODS_RECEIPT_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GOODS_RECEIPT_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GOODS_RECEIPT_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_VENDOR_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_VENDOR_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_VENDOR_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_VENDOR_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_INVOICE_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PAYMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DEPARTMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DEPARTMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DEPARTMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DEPARTMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DOCUMENT_TYPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DOCUMENT_TYPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DOCUMENT_TYPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DOCUMENT_TYPES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DOCUMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DOCUMENT_LINKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DOCUMENT_LINKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DOCUMENT_LINKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DOCUMENT_LINKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_APPROVAL_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_APPROVAL_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_APPROVAL_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_APPROVAL_WORKFLOWS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_APPROVAL_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_APPROVAL_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_APPROVAL_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_APPROVAL_STEPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_APPROVALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_APPROVALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_APPROVALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_APPROVALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ACTIVITY_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ACTIVITY_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ACTIVITY_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ACTIVITY_LOGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_UI_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_UI_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_UI_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_UI_ANNOUNCEMENTS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ROLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PERMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ORGANIZATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_COMPANIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_COMPANIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_USER_ROLE_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USER_ROLE_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USER_ROLE_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USER_ROLE_ASSIGNMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ROLE_PERMISSION_MAPPINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ROLE_PERMISSION_MAPPINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ROLE_PERMISSION_MAPPINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ROLE_PERMISSION_MAPPINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_VENDORS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_VENDORS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_WAREHOUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_WAREHOUSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PRODUCT_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PRODUCT_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PRODUCT_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PRODUCT_CATEGORIES') },
    
    { 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_PURCHASE_REQUISITIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PURCHASE_REQUISITIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PURCHASE_REQUISITIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PURCHASE_REQUISITIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PURCHASE_REQUISITION_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PURCHASE_REQUISITION_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PURCHASE_REQUISITION_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PURCHASE_REQUISITION_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PURCHASE_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PURCHASE_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PURCHASE_ORDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PURCHASE_ORDERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PURCHASE_ORDER_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PURCHASE_ORDER_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PURCHASE_ORDER_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PURCHASE_ORDER_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GOODS_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GOODS_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GOODS_RECEIPTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GOODS_RECEIPTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GOODS_RECEIPT_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GOODS_RECEIPT_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GOODS_RECEIPT_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GOODS_RECEIPT_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_VENDOR_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_VENDOR_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_VENDOR_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_VENDOR_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_INVOICE_LINES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_INVOICE_LINES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PAYMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DEPARTMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DEPARTMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DEPARTMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DEPARTMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DOCUMENT_TYPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DOCUMENT_TYPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DOCUMENT_TYPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DOCUMENT_TYPES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DOCUMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DOCUMENT_LINKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DOCUMENT_LINKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DOCUMENT_LINKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DOCUMENT_LINKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_APPROVAL_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_APPROVAL_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_APPROVAL_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_APPROVAL_WORKFLOWS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_APPROVAL_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_APPROVAL_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_APPROVAL_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_APPROVAL_STEPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_APPROVALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_APPROVALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_APPROVALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_APPROVALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ACTIVITY_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ACTIVITY_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ACTIVITY_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ACTIVITY_LOGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_UI_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_UI_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_UI_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_UI_ANNOUNCEMENTS') },
    
    
    
    { 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("User")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("User")}' WHERE "email"='john@doe.com'`);
      
      

}
};

