
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("Administrator"), name: "Administrator", createdAt, updatedAt },
      
      
        
          { id: getId("platform_owner"), name: "platform_owner", createdAt, updatedAt },
        
          { id: getId("trust_and_safety_lead"), name: "trust_and_safety_lead", createdAt, updatedAt },
        
          { id: getId("support_manager"), name: "support_manager", createdAt, updatedAt },
        
          { id: getId("growth_analyst"), name: "growth_analyst", createdAt, updatedAt },
        
          { id: getId("premium_ops_specialist"), name: "premium_ops_specialist", 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","user_photos","languages","user_languages","interests","user_interests","discovery_preferences","swipes","matches","messages","chat_events","blocks","reports","report_attachments","notifications","daily_sparks","daily_spark_recommendations","premium_plans","subscriptions","user_settings","content_moderation_items","admin_users","analytics_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.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("platform_owner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_USER_PHOTOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_USER_PHOTOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_USER_PHOTOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_USER_PHOTOS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_USER_PHOTOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('UPDATE_USER_PHOTOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('DELETE_USER_PHOTOS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_USER_PHOTOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_USER_PHOTOS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_USER_PHOTOS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_USER_PHOTOS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_LANGUAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_LANGUAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_LANGUAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_LANGUAGES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_USER_LANGUAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_USER_LANGUAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_USER_LANGUAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_USER_LANGUAGES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_USER_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_USER_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_USER_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_USER_LANGUAGES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_INTERESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_INTERESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_INTERESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_INTERESTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_USER_INTERESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_USER_INTERESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_USER_INTERESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_USER_INTERESTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_USER_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_USER_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_USER_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_USER_INTERESTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_DISCOVERY_PREFERENCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_DISCOVERY_PREFERENCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_DISCOVERY_PREFERENCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_DISCOVERY_PREFERENCES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_DISCOVERY_PREFERENCES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_DISCOVERY_PREFERENCES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_DISCOVERY_PREFERENCES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_DISCOVERY_PREFERENCES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_SWIPES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_SWIPES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_SWIPES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_SWIPES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_SWIPES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_SWIPES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_SWIPES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_SWIPES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_MATCHES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_MATCHES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_MATCHES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_MATCHES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_MATCHES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_MATCHES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_MATCHES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_MATCHES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_MATCHES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_CHAT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_CHAT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_CHAT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_CHAT_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_CHAT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_CHAT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_CHAT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_CHAT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_BLOCKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_BLOCKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_BLOCKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_BLOCKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_BLOCKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('UPDATE_BLOCKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('DELETE_BLOCKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_BLOCKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_BLOCKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_BLOCKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_BLOCKS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_REPORTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('CREATE_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('UPDATE_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('DELETE_REPORTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_REPORTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_REPORTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_REPORTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_REPORT_ATTACHMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_REPORT_ATTACHMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_REPORT_ATTACHMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_REPORT_ATTACHMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('CREATE_REPORT_ATTACHMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_REPORT_ATTACHMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('UPDATE_REPORT_ATTACHMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('DELETE_REPORT_ATTACHMENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_REPORT_ATTACHMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_REPORT_ATTACHMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_REPORT_ATTACHMENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_NOTIFICATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('DELETE_NOTIFICATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_DAILY_SPARKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_DAILY_SPARKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_DAILY_SPARKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_DAILY_SPARKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_DAILY_SPARKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_DAILY_SPARKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_DAILY_SPARKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_DAILY_SPARKS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_DAILY_SPARK_RECOMMENDATIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_PREMIUM_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_PREMIUM_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_PREMIUM_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_PREMIUM_PLANS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_PREMIUM_PLANS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_PREMIUM_PLANS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_PREMIUM_PLANS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_PREMIUM_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('UPDATE_PREMIUM_PLANS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_SUBSCRIPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_SUBSCRIPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_SUBSCRIPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_SUBSCRIPTIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_SUBSCRIPTIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_SUBSCRIPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_SUBSCRIPTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_SUBSCRIPTIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('CREATE_SUBSCRIPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_SUBSCRIPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('UPDATE_SUBSCRIPTIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_USER_SETTINGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_USER_SETTINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_CONTENT_MODERATION_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('CREATE_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('UPDATE_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('DELETE_CONTENT_MODERATION_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('UPDATE_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_CONTENT_MODERATION_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_ADMIN_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_ADMIN_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_ADMIN_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_ADMIN_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_ADMIN_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_ADMIN_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_ADMIN_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_ADMIN_USERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_ANALYTICS_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_ANALYTICS_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_ANALYTICS_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_ANALYTICS_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('READ_ANALYTICS_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('READ_ANALYTICS_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('READ_ANALYTICS_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('UPDATE_ANALYTICS_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), permissionId: getId('READ_ANALYTICS_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("trust_and_safety_lead"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("support_manager"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("growth_analyst"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("premium_ops_specialist"), 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_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ROLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PERMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USER_PHOTOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USER_PHOTOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USER_PHOTOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USER_PHOTOS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_LANGUAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_LANGUAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_LANGUAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_LANGUAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USER_LANGUAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USER_LANGUAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USER_LANGUAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USER_LANGUAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_INTERESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_INTERESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_INTERESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_INTERESTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USER_INTERESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USER_INTERESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USER_INTERESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USER_INTERESTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DISCOVERY_PREFERENCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DISCOVERY_PREFERENCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DISCOVERY_PREFERENCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DISCOVERY_PREFERENCES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SWIPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SWIPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SWIPES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SWIPES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MATCHES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MATCHES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MATCHES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MATCHES') },
    
    { 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_CHAT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CHAT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CHAT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CHAT_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_BLOCKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_BLOCKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_BLOCKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_BLOCKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_REPORTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_REPORT_ATTACHMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_REPORT_ATTACHMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_REPORT_ATTACHMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_REPORT_ATTACHMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_NOTIFICATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DAILY_SPARKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DAILY_SPARKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DAILY_SPARKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DAILY_SPARKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DAILY_SPARK_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DAILY_SPARK_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DAILY_SPARK_RECOMMENDATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DAILY_SPARK_RECOMMENDATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PREMIUM_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PREMIUM_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PREMIUM_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PREMIUM_PLANS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SUBSCRIPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SUBSCRIPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SUBSCRIPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SUBSCRIPTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USER_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONTENT_MODERATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONTENT_MODERATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONTENT_MODERATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONTENT_MODERATION_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ADMIN_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ADMIN_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ADMIN_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ADMIN_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ANALYTICS_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ANALYTICS_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ANALYTICS_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ANALYTICS_EVENTS') },
    
    
    
    { 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("platform_owner")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("trust_and_safety_lead")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

