
const { v4: uuid } = require("uuid");

module.exports = {
  /**
   * @param{import("sequelize").QueryInterface} queryInterface
   * @return {Promise<void>}
   */
  async up(queryInterface) {
    const createdAt = new Date();
    const updatedAt = new Date();

    /** @type {Map<string, string>} */
    const idMap = new Map();

    /**
     * @param {string} key
     * @return {string}
     */
    function getId(key) {
      if (idMap.has(key)) {
        return idMap.get(key);
      }
      const id = uuid();
      idMap.set(key, id);
      return id;
    }

    await queryInterface.bulkInsert("roles", [
      
      { id: getId("SuperAdmin"), name: "Super Administrator", createdAt, updatedAt },
      
      
      { id: getId("Administrator"), name: "Administrator", createdAt, updatedAt },
      
      
        
          { id: getId("PlatformOwner"), name: "Platform Owner", createdAt, updatedAt },
        
          { id: getId("SystemAuditor"), name: "System Auditor", createdAt, updatedAt },
        
          { id: getId("SchoolDirector"), name: "School Director", createdAt, updatedAt },
        
          { id: getId("AcademicStaff"), name: "Academic Staff", createdAt, updatedAt },
        
          { id: getId("Learner"), name: "Learner", 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","schools","grade_levels","subjects","classrooms","classroom_memberships","teaching_assignments","homeworks","homework_rubrics","homework_extensions","homework_submissions","submission_grades","rubric_scores","gradebooks","gradebook_columns","gradebook_entries","adviser_reports","announcements","notifications","account_applications","guardians","security_events","support_settings","feedback_items","events","ai_monitoring_rules",,
    ];
await queryInterface.bulkInsert("permissions", entities.flatMap(createPermissions));
await queryInterface.bulkInsert("permissions", [{ id: getId(`READ_API_DOCS`), createdAt, updatedAt, name: `READ_API_DOCS` }]);
await queryInterface.bulkInsert("permissions", [{ id: getId(`CREATE_SEARCH`), createdAt, updatedAt, name: `CREATE_SEARCH`}]);

await queryInterface.bulkUpdate('roles', { globalAccess: true }, { id: getId('SuperAdmin') });


await queryInterface.sequelize.query(`create table "rolesPermissionsPermissions"
(
"createdAt"           timestamp with time zone not null,
"updatedAt"           timestamp with time zone not null,
"roles_permissionsId" uuid                     not null,
"permissionId"        uuid                     not null,
primary key ("roles_permissionsId", "permissionId")
);`);


await queryInterface.bulkInsert("rolesPermissionsPermissions", [
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GRADE_LEVELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GRADE_LEVELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GRADE_LEVELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GRADE_LEVELS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_GRADE_LEVELS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_GRADE_LEVELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_GRADE_LEVELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_GRADE_LEVELS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_GRADE_LEVELS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_GRADE_LEVELS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SUBJECTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_SUBJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CLASSROOMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CLASSROOMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CLASSROOMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CLASSROOMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_CLASSROOMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_CLASSROOMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_CLASSROOMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_CLASSROOMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_CLASSROOMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_CLASSROOMS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CLASSROOM_MEMBERSHIPS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('CREATE_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_CLASSROOM_MEMBERSHIPS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TEACHING_ASSIGNMENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_TEACHING_ASSIGNMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_HOMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_HOMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_HOMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_HOMEWORKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_HOMEWORKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_HOMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_HOMEWORKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_HOMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_HOMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_HOMEWORKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_HOMEWORKS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_HOMEWORK_RUBRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_HOMEWORK_RUBRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_HOMEWORK_RUBRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_HOMEWORK_RUBRICS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_HOMEWORK_RUBRICS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_HOMEWORK_RUBRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_HOMEWORK_RUBRICS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_HOMEWORK_RUBRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_HOMEWORK_RUBRICS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_HOMEWORK_RUBRICS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_HOMEWORK_RUBRICS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_HOMEWORK_EXTENSIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_HOMEWORK_EXTENSIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_HOMEWORK_SUBMISSIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('CREATE_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('UPDATE_HOMEWORK_SUBMISSIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SUBMISSION_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SUBMISSION_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SUBMISSION_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SUBMISSION_GRADES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_SUBMISSION_GRADES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_SUBMISSION_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_SUBMISSION_GRADES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_SUBMISSION_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_SUBMISSION_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_SUBMISSION_GRADES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_SUBMISSION_GRADES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_RUBRIC_SCORES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_RUBRIC_SCORES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_RUBRIC_SCORES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_RUBRIC_SCORES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_RUBRIC_SCORES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_RUBRIC_SCORES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_RUBRIC_SCORES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_RUBRIC_SCORES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_RUBRIC_SCORES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_RUBRIC_SCORES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_RUBRIC_SCORES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GRADEBOOKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GRADEBOOKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GRADEBOOKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GRADEBOOKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_GRADEBOOKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_GRADEBOOKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_GRADEBOOKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_GRADEBOOKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_GRADEBOOKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_GRADEBOOKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_GRADEBOOKS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GRADEBOOK_COLUMNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GRADEBOOK_COLUMNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GRADEBOOK_COLUMNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GRADEBOOK_COLUMNS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_GRADEBOOK_COLUMNS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_GRADEBOOK_COLUMNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_GRADEBOOK_COLUMNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_GRADEBOOK_COLUMNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_GRADEBOOK_COLUMNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_GRADEBOOK_COLUMNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_GRADEBOOK_COLUMNS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GRADEBOOK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GRADEBOOK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GRADEBOOK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GRADEBOOK_ENTRIES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_GRADEBOOK_ENTRIES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_GRADEBOOK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_GRADEBOOK_ENTRIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_GRADEBOOK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_GRADEBOOK_ENTRIES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_GRADEBOOK_ENTRIES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_GRADEBOOK_ENTRIES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ADVISER_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ADVISER_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ADVISER_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ADVISER_REPORTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_ADVISER_REPORTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_ADVISER_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_ADVISER_REPORTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_ADVISER_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_ADVISER_REPORTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_ADVISER_REPORTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ANNOUNCEMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ANNOUNCEMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ANNOUNCEMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ANNOUNCEMENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_ANNOUNCEMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_ANNOUNCEMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_ANNOUNCEMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_ANNOUNCEMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_ANNOUNCEMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_ANNOUNCEMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_ANNOUNCEMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_ANNOUNCEMENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_NOTIFICATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ACCOUNT_APPLICATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('CREATE_ACCOUNT_APPLICATIONS') },
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GUARDIANS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_GUARDIANS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_GUARDIANS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_GUARDIANS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('CREATE_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_GUARDIANS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SECURITY_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SECURITY_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SECURITY_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SECURITY_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_SECURITY_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('UPDATE_SECURITY_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_SECURITY_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_SECURITY_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_SECURITY_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SUPPORT_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_SUPPORT_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_SUPPORT_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_SUPPORT_SETTINGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_SUPPORT_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_FEEDBACK_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_FEEDBACK_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_FEEDBACK_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_FEEDBACK_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_FEEDBACK_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_FEEDBACK_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_FEEDBACK_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('CREATE_FEEDBACK_ITEMS') },
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('UPDATE_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Learner"), permissionId: getId('READ_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_AI_MONITORING_RULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_AI_MONITORING_RULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_AI_MONITORING_RULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_AI_MONITORING_RULES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('READ_AI_MONITORING_RULES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('UPDATE_AI_MONITORING_RULES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("SystemAuditor"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("SchoolDirector"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("AcademicStaff"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("Learner"), 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_GRADE_LEVELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GRADE_LEVELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GRADE_LEVELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GRADE_LEVELS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SUBJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CLASSROOMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CLASSROOMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CLASSROOMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CLASSROOMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CLASSROOM_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CLASSROOM_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CLASSROOM_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CLASSROOM_MEMBERSHIPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TEACHING_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TEACHING_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TEACHING_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TEACHING_ASSIGNMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_HOMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_HOMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_HOMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_HOMEWORKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_HOMEWORK_RUBRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_HOMEWORK_RUBRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_HOMEWORK_RUBRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_HOMEWORK_RUBRICS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_HOMEWORK_EXTENSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_HOMEWORK_EXTENSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_HOMEWORK_EXTENSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_HOMEWORK_EXTENSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_HOMEWORK_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_HOMEWORK_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_HOMEWORK_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_HOMEWORK_SUBMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SUBMISSION_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SUBMISSION_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SUBMISSION_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SUBMISSION_GRADES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_RUBRIC_SCORES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_RUBRIC_SCORES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_RUBRIC_SCORES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_RUBRIC_SCORES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GRADEBOOKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GRADEBOOKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GRADEBOOKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GRADEBOOKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GRADEBOOK_COLUMNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GRADEBOOK_COLUMNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GRADEBOOK_COLUMNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GRADEBOOK_COLUMNS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GRADEBOOK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GRADEBOOK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GRADEBOOK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GRADEBOOK_ENTRIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ADVISER_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ADVISER_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ADVISER_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ADVISER_REPORTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ANNOUNCEMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_NOTIFICATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ACCOUNT_APPLICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ACCOUNT_APPLICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ACCOUNT_APPLICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ACCOUNT_APPLICATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GUARDIANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GUARDIANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GUARDIANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GUARDIANS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SECURITY_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SECURITY_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SECURITY_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SECURITY_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SUPPORT_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SUPPORT_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SUPPORT_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SUPPORT_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FEEDBACK_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FEEDBACK_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FEEDBACK_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FEEDBACK_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_AI_MONITORING_RULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_AI_MONITORING_RULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_AI_MONITORING_RULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_AI_MONITORING_RULES') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ROLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PERMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SCHOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SCHOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SCHOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SCHOOLS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GRADE_LEVELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GRADE_LEVELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GRADE_LEVELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GRADE_LEVELS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SUBJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CLASSROOMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CLASSROOMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CLASSROOMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CLASSROOMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CLASSROOM_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CLASSROOM_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CLASSROOM_MEMBERSHIPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CLASSROOM_MEMBERSHIPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TEACHING_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TEACHING_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TEACHING_ASSIGNMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TEACHING_ASSIGNMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_HOMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_HOMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_HOMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_HOMEWORKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_HOMEWORK_RUBRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_HOMEWORK_RUBRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_HOMEWORK_RUBRICS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_HOMEWORK_RUBRICS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_HOMEWORK_EXTENSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_HOMEWORK_EXTENSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_HOMEWORK_EXTENSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_HOMEWORK_EXTENSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_HOMEWORK_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_HOMEWORK_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_HOMEWORK_SUBMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_HOMEWORK_SUBMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SUBMISSION_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SUBMISSION_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SUBMISSION_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SUBMISSION_GRADES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_RUBRIC_SCORES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_RUBRIC_SCORES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_RUBRIC_SCORES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_RUBRIC_SCORES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GRADEBOOKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GRADEBOOKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GRADEBOOKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GRADEBOOKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GRADEBOOK_COLUMNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GRADEBOOK_COLUMNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GRADEBOOK_COLUMNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GRADEBOOK_COLUMNS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GRADEBOOK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GRADEBOOK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GRADEBOOK_ENTRIES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GRADEBOOK_ENTRIES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ADVISER_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ADVISER_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ADVISER_REPORTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ADVISER_REPORTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ANNOUNCEMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ANNOUNCEMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_NOTIFICATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ACCOUNT_APPLICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ACCOUNT_APPLICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ACCOUNT_APPLICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ACCOUNT_APPLICATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GUARDIANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GUARDIANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GUARDIANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GUARDIANS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SECURITY_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SECURITY_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SECURITY_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SECURITY_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SUPPORT_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SUPPORT_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SUPPORT_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SUPPORT_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_FEEDBACK_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_FEEDBACK_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_FEEDBACK_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_FEEDBACK_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_AI_MONITORING_RULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_AI_MONITORING_RULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_AI_MONITORING_RULES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_AI_MONITORING_RULES') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_API_DOCS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SEARCH') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_API_DOCS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SEARCH') },
    ]);


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

}
};

