
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("SistemSahibi"), name: "Sistem Sahibi", createdAt, updatedAt },
        
          { id: getId("OperasyonYoneticisi"), name: "Operasyon Yoneticisi", createdAt, updatedAt },
        
          { id: getId("IcerikYoneticisi"), name: "Icerik Yoneticisi", createdAt, updatedAt },
        
          { id: getId("SatisTemsilcisi"), name: "Satis Temsilcisi", createdAt, updatedAt },
        
          { id: getId("Gozlemci"), name: "Gozlemci", 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","site_settings","pages","service_categories","services","projects","testimonials","faqs","leads","media_assets","home_sections",,
    ];
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("SistemSahibi"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_SITE_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_SITE_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_SITE_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_SITE_SETTINGS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_SITE_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_SITE_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_SITE_SETTINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_SITE_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_SITE_SETTINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_SITE_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_SITE_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_PAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_PAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_PAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_PAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_PAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_PAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_PAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_PAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_PAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_PAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_PAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_PAGES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_SERVICE_CATEGORIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_SERVICE_CATEGORIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_SERVICE_CATEGORIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_SERVICE_CATEGORIES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_SERVICE_CATEGORIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_SERVICE_CATEGORIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_SERVICE_CATEGORIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_SERVICE_CATEGORIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_SERVICE_CATEGORIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_SERVICE_CATEGORIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_SERVICE_CATEGORIES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_SERVICE_CATEGORIES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_SERVICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_SERVICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_SERVICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_SERVICES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_SERVICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_SERVICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_SERVICES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_SERVICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_SERVICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_SERVICES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_SERVICES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_SERVICES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_PROJECTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_PROJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_PROJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_PROJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_PROJECTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_PROJECTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_TESTIMONIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_TESTIMONIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_TESTIMONIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_TESTIMONIALS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_TESTIMONIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_TESTIMONIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_TESTIMONIALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_TESTIMONIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_TESTIMONIALS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_TESTIMONIALS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_TESTIMONIALS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_TESTIMONIALS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_FAQS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_FAQS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_FAQS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_FAQS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_FAQS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_FAQS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_FAQS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_FAQS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_FAQS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_FAQS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_FAQS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_FAQS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_LEADS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('DELETE_LEADS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_LEADS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('CREATE_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('UPDATE_LEADS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_LEADS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_MEDIA_ASSETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_MEDIA_ASSETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_MEDIA_ASSETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_MEDIA_ASSETS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_MEDIA_ASSETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_MEDIA_ASSETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_MEDIA_ASSETS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_MEDIA_ASSETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_MEDIA_ASSETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_MEDIA_ASSETS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_MEDIA_ASSETS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_MEDIA_ASSETS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_HOME_SECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('READ_HOME_SECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('UPDATE_HOME_SECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('DELETE_HOME_SECTIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_HOME_SECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('READ_HOME_SECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('UPDATE_HOME_SECTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_HOME_SECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('READ_HOME_SECTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('UPDATE_HOME_SECTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('READ_HOME_SECTIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), permissionId: getId('READ_HOME_SECTIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("SistemSahibi"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("OperasyonYoneticisi"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("IcerikYoneticisi"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("SatisTemsilcisi"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("Gozlemci"), 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_SITE_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SITE_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SITE_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SITE_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SERVICE_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SERVICE_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SERVICE_CATEGORIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SERVICE_CATEGORIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SERVICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SERVICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SERVICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SERVICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PROJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PROJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PROJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PROJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TESTIMONIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TESTIMONIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TESTIMONIALS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TESTIMONIALS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FAQS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FAQS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FAQS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FAQS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_LEADS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_LEADS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MEDIA_ASSETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MEDIA_ASSETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MEDIA_ASSETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MEDIA_ASSETS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_HOME_SECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_HOME_SECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_HOME_SECTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_HOME_SECTIONS') },
    
    
    
    { 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("SistemSahibi")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("OperasyonYoneticisi")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

