
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("PlatformOwner"), name: "Platform Owner", createdAt, updatedAt },
        
          { id: getId("AISystemsManager"), name: "AI Systems Manager", createdAt, updatedAt },
        
          { id: getId("CampaignStrategist"), name: "Campaign Strategist", createdAt, updatedAt },
        
          { id: getId("KnowledgeCurator"), name: "Knowledge Curator", createdAt, updatedAt },
        
          { id: getId("PerformanceAnalyst"), name: "Performance Analyst", 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","brands","brand_voice_profiles","brain_profiles","skill_modules","six_hat_sessions","knowledge_sources","knowledge_documents","knowledge_chunks","knowledge_nodes","campaigns","campaign_brain_configs","safety_policies","audit_events","ad_projects","ad_creatives","generation_runs","generation_outputs","output_citations","feedback_entries","learning_signals","platform_metrics","sandbox_scenarios","refresh_jobs","approval_reviews",,
    ];
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("PlatformOwner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_BRANDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_BRANDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_BRANDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_BRANDS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_BRANDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_BRANDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_BRANDS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_BRANDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_BRANDS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_BRANDS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_BRANDS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_BRAND_VOICE_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_BRAND_VOICE_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_BRAND_VOICE_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_BRAND_VOICE_PROFILES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_BRAND_VOICE_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_BRAND_VOICE_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_BRAND_VOICE_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_BRAND_VOICE_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_BRAND_VOICE_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_BRAND_VOICE_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_BRAND_VOICE_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_BRAND_VOICE_PROFILES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_BRAIN_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_BRAIN_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_BRAIN_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_BRAIN_PROFILES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_BRAIN_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_BRAIN_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_BRAIN_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_BRAIN_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_BRAIN_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_BRAIN_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_BRAIN_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_BRAIN_PROFILES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SKILL_MODULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SKILL_MODULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SKILL_MODULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SKILL_MODULES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_SKILL_MODULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_SKILL_MODULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_SKILL_MODULES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_SKILL_MODULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_SKILL_MODULES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_SKILL_MODULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_SKILL_MODULES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_SKILL_MODULES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SIX_HAT_SESSIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_SIX_HAT_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_SIX_HAT_SESSIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_KNOWLEDGE_SOURCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_KNOWLEDGE_SOURCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_KNOWLEDGE_SOURCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_KNOWLEDGE_SOURCES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_KNOWLEDGE_SOURCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_KNOWLEDGE_SOURCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_KNOWLEDGE_SOURCES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_KNOWLEDGE_SOURCES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_KNOWLEDGE_SOURCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_KNOWLEDGE_SOURCES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_KNOWLEDGE_SOURCES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_KNOWLEDGE_SOURCES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_KNOWLEDGE_DOCUMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_KNOWLEDGE_DOCUMENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_KNOWLEDGE_CHUNKS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_KNOWLEDGE_CHUNKS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_KNOWLEDGE_NODES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_KNOWLEDGE_NODES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_KNOWLEDGE_NODES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_KNOWLEDGE_NODES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_KNOWLEDGE_NODES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_KNOWLEDGE_NODES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_KNOWLEDGE_NODES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_KNOWLEDGE_NODES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_KNOWLEDGE_NODES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_KNOWLEDGE_NODES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_KNOWLEDGE_NODES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_KNOWLEDGE_NODES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CAMPAIGNS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_CAMPAIGNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_CAMPAIGNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_CAMPAIGNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_CAMPAIGNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_CAMPAIGNS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_CAMPAIGN_BRAIN_CONFIGS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SAFETY_POLICIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SAFETY_POLICIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SAFETY_POLICIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SAFETY_POLICIES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_SAFETY_POLICIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_SAFETY_POLICIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_SAFETY_POLICIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_SAFETY_POLICIES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_SAFETY_POLICIES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_SAFETY_POLICIES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_AUDIT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_AUDIT_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_AUDIT_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_AUDIT_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_AD_PROJECTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_AD_PROJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_AD_PROJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_AD_PROJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_AD_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_AD_PROJECTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_AD_CREATIVES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_AD_CREATIVES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_AD_CREATIVES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_AD_CREATIVES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_AD_CREATIVES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_AD_CREATIVES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GENERATION_RUNS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_GENERATION_RUNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_GENERATION_RUNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_GENERATION_RUNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_GENERATION_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_GENERATION_RUNS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GENERATION_OUTPUTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_GENERATION_OUTPUTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_GENERATION_OUTPUTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_GENERATION_OUTPUTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_GENERATION_OUTPUTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_GENERATION_OUTPUTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_OUTPUT_CITATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_OUTPUT_CITATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_OUTPUT_CITATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_OUTPUT_CITATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_OUTPUT_CITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_OUTPUT_CITATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_FEEDBACK_ENTRIES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('CREATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_FEEDBACK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_FEEDBACK_ENTRIES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_LEARNING_SIGNALS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_LEARNING_SIGNALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_LEARNING_SIGNALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_LEARNING_SIGNALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('CREATE_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_LEARNING_SIGNALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_LEARNING_SIGNALS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_PLATFORM_METRICS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_PLATFORM_METRICS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_PLATFORM_METRICS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_PLATFORM_METRICS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('CREATE_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_PLATFORM_METRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_PLATFORM_METRICS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SANDBOX_SCENARIOS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('UPDATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_SANDBOX_SCENARIOS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_SANDBOX_SCENARIOS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_REFRESH_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_REFRESH_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_REFRESH_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_REFRESH_JOBS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_REFRESH_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_REFRESH_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_REFRESH_JOBS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_REFRESH_JOBS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_REFRESH_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_REFRESH_JOBS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_REFRESH_JOBS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_REFRESH_JOBS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_APPROVAL_REVIEWS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('READ_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('UPDATE_APPROVAL_REVIEWS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('READ_APPROVAL_REVIEWS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('READ_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('UPDATE_APPROVAL_REVIEWS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('READ_APPROVAL_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), permissionId: getId('UPDATE_APPROVAL_REVIEWS') },
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("AISystemsManager"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("CampaignStrategist"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("KnowledgeCurator"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("PerformanceAnalyst"), 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_BRANDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_BRANDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_BRANDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_BRANDS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_BRAND_VOICE_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_BRAND_VOICE_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_BRAND_VOICE_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_BRAND_VOICE_PROFILES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_BRAIN_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_BRAIN_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_BRAIN_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_BRAIN_PROFILES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SKILL_MODULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SKILL_MODULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SKILL_MODULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SKILL_MODULES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SIX_HAT_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SIX_HAT_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SIX_HAT_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SIX_HAT_SESSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_KNOWLEDGE_SOURCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_KNOWLEDGE_SOURCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_KNOWLEDGE_SOURCES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_KNOWLEDGE_SOURCES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_KNOWLEDGE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_KNOWLEDGE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_KNOWLEDGE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_KNOWLEDGE_DOCUMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_KNOWLEDGE_CHUNKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_KNOWLEDGE_CHUNKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_KNOWLEDGE_CHUNKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_KNOWLEDGE_CHUNKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_KNOWLEDGE_NODES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_KNOWLEDGE_NODES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_KNOWLEDGE_NODES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_KNOWLEDGE_NODES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CAMPAIGNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CAMPAIGNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CAMPAIGNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CAMPAIGNS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CAMPAIGN_BRAIN_CONFIGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CAMPAIGN_BRAIN_CONFIGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CAMPAIGN_BRAIN_CONFIGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CAMPAIGN_BRAIN_CONFIGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SAFETY_POLICIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SAFETY_POLICIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SAFETY_POLICIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SAFETY_POLICIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_AUDIT_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_AUDIT_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_AD_PROJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_AD_PROJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_AD_PROJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_AD_PROJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_AD_CREATIVES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_AD_CREATIVES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_AD_CREATIVES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_AD_CREATIVES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GENERATION_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GENERATION_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GENERATION_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GENERATION_RUNS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GENERATION_OUTPUTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GENERATION_OUTPUTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GENERATION_OUTPUTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GENERATION_OUTPUTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_OUTPUT_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_OUTPUT_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_OUTPUT_CITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_OUTPUT_CITATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FEEDBACK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FEEDBACK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FEEDBACK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FEEDBACK_ENTRIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_LEARNING_SIGNALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_LEARNING_SIGNALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_LEARNING_SIGNALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_LEARNING_SIGNALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PLATFORM_METRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PLATFORM_METRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PLATFORM_METRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PLATFORM_METRICS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SANDBOX_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SANDBOX_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SANDBOX_SCENARIOS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SANDBOX_SCENARIOS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_REFRESH_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_REFRESH_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_REFRESH_JOBS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_REFRESH_JOBS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_APPROVAL_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_APPROVAL_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_APPROVAL_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_APPROVAL_REVIEWS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_API_DOCS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SEARCH') },
    ]);


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

}
};

