
import { v4 as uuid } from 'uuid';
import type { CreationAttributes, QueryInterface } from 'sequelize';
import type { Roles } from '@/db/models/roles';
import type { Permissions } from '@/db/models/permissions';

export default {
  async up(queryInterface: QueryInterface) {
    const createdAt = new Date();
    const updatedAt = new Date();

    const idMap = new Map<string, string>();

    function getId(key: string): string {
      const existing = idMap.get(key);
      if (existing !== undefined) {
        return existing;
      }
      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("TenantDirector"), name: "Tenant Director", createdAt, updatedAt },
        
          { id: getId("CampusManager"), name: "Campus Manager", createdAt, updatedAt },
        
          { id: getId("AcademicCoordinator"), name: "Academic Coordinator", createdAt, updatedAt },
        
          { id: getId("FinanceOfficer"), name: "Finance Officer", createdAt, updatedAt },
        
      
      
      { id: getId("Public"), name: "Public", createdAt, updatedAt },
    ] satisfies CreationAttributes<Roles>[]);

    function createPermissions(
      name: string,
    ): CreationAttributes<Permissions>[] {
      return [
        { id: getId(`CREATE_${name.toUpperCase()}`), createdAt, updatedAt, name: `CREATE_${name.toUpperCase()}` },
        { id: getId(`READ_${name.toUpperCase()}`), createdAt, updatedAt, name: `READ_${name.toUpperCase()}` },
        { id: getId(`UPDATE_${name.toUpperCase()}`), createdAt, updatedAt, name: `UPDATE_${name.toUpperCase()}` },
        { id: getId(`DELETE_${name.toUpperCase()}`), createdAt, updatedAt, name: `DELETE_${name.toUpperCase()}` }
      ];
    }

    const entities = [
      "users","roles","permissions","organizations","campuses","academic_years","grades","subjects","students","guardians","staff","classes","class_enrollments","class_subjects","timetables","timetable_periods","attendance_sessions","attendance_records","fee_plans","invoices","payments","assessments","assessment_results","messages","message_recipients","documents",
    ];
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.bulkUpdate('roles', { globalAccess: true }, { id: getId('Administrator') });

// The "rolesPermissionsPermissions" join table is created by `sequelize.sync`
// from the roles<->permissions M:N association, so the seeder only inserts rows.
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("TenantDirector"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CAMPUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CAMPUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CAMPUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CAMPUSES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_CAMPUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_CAMPUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_CAMPUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_CAMPUSES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_CAMPUSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_CAMPUSES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_CAMPUSES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_CAMPUSES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ACADEMIC_YEARS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ACADEMIC_YEARS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ACADEMIC_YEARS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ACADEMIC_YEARS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_ACADEMIC_YEARS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_ACADEMIC_YEARS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_ACADEMIC_YEARS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_ACADEMIC_YEARS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_ACADEMIC_YEARS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_ACADEMIC_YEARS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_ACADEMIC_YEARS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_ACADEMIC_YEARS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_GRADES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_GRADES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_GRADES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_GRADES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_GRADES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { 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("TenantDirector"), permissionId: getId('CREATE_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_SUBJECTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_SUBJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_SUBJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_STUDENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_STUDENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_STUDENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_STUDENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('READ_STUDENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_STUDENTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { 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("TenantDirector"), permissionId: getId('CREATE_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_GUARDIANS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_GUARDIANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_GUARDIANS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_GUARDIANS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_GUARDIANS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_STAFF') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_STAFF') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_STAFF') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_STAFF') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_STAFF') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_STAFF') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CLASSES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_CLASSES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_CLASSES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_CLASSES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_CLASSES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_CLASSES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CLASS_ENROLLMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_CLASS_ENROLLMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_CLASS_ENROLLMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_CLASS_ENROLLMENTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CLASS_SUBJECTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_CLASS_SUBJECTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_CLASS_SUBJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_CLASS_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_CLASS_SUBJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TIMETABLES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_TIMETABLES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_TIMETABLES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_TIMETABLES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_TIMETABLES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TIMETABLE_PERIODS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_TIMETABLE_PERIODS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_TIMETABLE_PERIODS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_TIMETABLE_PERIODS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_TIMETABLE_PERIODS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ATTENDANCE_SESSIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_ATTENDANCE_SESSIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_ATTENDANCE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_ATTENDANCE_SESSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ATTENDANCE_RECORDS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_ATTENDANCE_RECORDS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_ATTENDANCE_RECORDS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_ATTENDANCE_RECORDS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_FEE_PLANS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_FEE_PLANS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_FEE_PLANS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('CREATE_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('READ_FEE_PLANS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_FEE_PLANS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_INVOICES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_INVOICES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('CREATE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('READ_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_INVOICES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('DELETE_INVOICES') },
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_PAYMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_PAYMENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_PAYMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('CREATE_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('READ_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_PAYMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('DELETE_PAYMENTS') },
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ASSESSMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_ASSESSMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_ASSESSMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_ASSESSMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_ASSESSMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ASSESSMENT_RESULTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_ASSESSMENT_RESULTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_ASSESSMENT_RESULTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_ASSESSMENT_RESULTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_MESSAGE_RECIPIENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_MESSAGE_RECIPIENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('READ_MESSAGE_RECIPIENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_MESSAGE_RECIPIENTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_DOCUMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('READ_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('UPDATE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('DELETE_DOCUMENTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('READ_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('UPDATE_DOCUMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('READ_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('UPDATE_DOCUMENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('READ_DOCUMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), permissionId: getId('UPDATE_DOCUMENTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("TenantDirector"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("CampusManager"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("AcademicCoordinator"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("FinanceOfficer"), 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_CAMPUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CAMPUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CAMPUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CAMPUSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ACADEMIC_YEARS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ACADEMIC_YEARS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ACADEMIC_YEARS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ACADEMIC_YEARS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_GRADES') },
    
    { 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_STUDENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_STUDENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_STUDENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_STUDENTS') },
    
    { 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_STAFF') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_STAFF') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_STAFF') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_STAFF') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CLASSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CLASSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CLASSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CLASSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CLASS_ENROLLMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CLASS_ENROLLMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CLASS_ENROLLMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CLASS_ENROLLMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CLASS_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CLASS_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CLASS_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CLASS_SUBJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TIMETABLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TIMETABLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TIMETABLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TIMETABLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TIMETABLE_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TIMETABLE_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TIMETABLE_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TIMETABLE_PERIODS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ATTENDANCE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ATTENDANCE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ATTENDANCE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ATTENDANCE_SESSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ATTENDANCE_RECORDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ATTENDANCE_RECORDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ATTENDANCE_RECORDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ATTENDANCE_RECORDS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_FEE_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_FEE_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_FEE_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_FEE_PLANS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PAYMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ASSESSMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ASSESSMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ASSESSMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ASSESSMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ASSESSMENT_RESULTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ASSESSMENT_RESULTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ASSESSMENT_RESULTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ASSESSMENT_RESULTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MESSAGE_RECIPIENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MESSAGE_RECIPIENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MESSAGE_RECIPIENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MESSAGE_RECIPIENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_DOCUMENTS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ROLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PERMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ORGANIZATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CAMPUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CAMPUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CAMPUSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CAMPUSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ACADEMIC_YEARS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ACADEMIC_YEARS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ACADEMIC_YEARS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ACADEMIC_YEARS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_GRADES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_GRADES') },
    
    { 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_STUDENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_STUDENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_STUDENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_STUDENTS') },
    
    { 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_STAFF') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_STAFF') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_STAFF') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_STAFF') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CLASSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CLASSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CLASSES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CLASSES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CLASS_ENROLLMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CLASS_ENROLLMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CLASS_ENROLLMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CLASS_ENROLLMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CLASS_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CLASS_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CLASS_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CLASS_SUBJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TIMETABLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TIMETABLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TIMETABLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TIMETABLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TIMETABLE_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TIMETABLE_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TIMETABLE_PERIODS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TIMETABLE_PERIODS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ATTENDANCE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ATTENDANCE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ATTENDANCE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ATTENDANCE_SESSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ATTENDANCE_RECORDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ATTENDANCE_RECORDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ATTENDANCE_RECORDS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ATTENDANCE_RECORDS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_FEE_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_FEE_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_FEE_PLANS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_FEE_PLANS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_INVOICES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_INVOICES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PAYMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PAYMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ASSESSMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ASSESSMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ASSESSMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ASSESSMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ASSESSMENT_RESULTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ASSESSMENT_RESULTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ASSESSMENT_RESULTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ASSESSMENT_RESULTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MESSAGE_RECIPIENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MESSAGE_RECIPIENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MESSAGE_RECIPIENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MESSAGE_RECIPIENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_DOCUMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_DOCUMENTS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('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("TenantDirector")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

