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

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

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

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

    await queryInterface.bulkInsert('roles', [
      {
        id: getId('SuperAdmin'),
        name: 'Super Administrator',
        createdAt,
        updatedAt,
      },

      {
        id: getId('Administrator'),
        name: 'Administrator',
        createdAt,
        updatedAt,
      },

      {
        id: getId('SystemOverseer'),
        name: 'System Overseer',
        createdAt,
        updatedAt,
      },

      {
        id: getId('EducationManager'),
        name: 'Education Manager',
        createdAt,
        updatedAt,
      },

      {
        id: getId('AcademicCoordinator'),
        name: 'Academic Coordinator',
        createdAt,
        updatedAt,
      },

      { id: getId('Learner'), name: 'Learner', createdAt, updatedAt },

      { id: getId('Guardian'), name: 'Guardian', createdAt, updatedAt },
    ]);

    /**
     * @param {string} name
     */
    function createPermissions(name) {
      return [
        {
          id: getId(`CREATE_${name.toUpperCase()}`),
          createdAt,
          updatedAt,
          name: `CREATE_${name.toUpperCase()}`,
        },
        {
          id: getId(`READ_${name.toUpperCase()}`),
          createdAt,
          updatedAt,
          name: `READ_${name.toUpperCase()}`,
        },
        {
          id: getId(`UPDATE_${name.toUpperCase()}`),
          createdAt,
          updatedAt,
          name: `UPDATE_${name.toUpperCase()}`,
        },
        {
          id: getId(`DELETE_${name.toUpperCase()}`),
          createdAt,
          updatedAt,
          name: `DELETE_${name.toUpperCase()}`,
        },
      ];
    }

    const entities = [
      'users',
      'activity_logs',
      'assignment_submissions',
      'assignments',
      'bills',
      'class_messages',
      'class_subjects',
      'classes',
      'exam_subjects',
      'exams',
      'fee_payments',
      'fee_structures',
      'lesson_plans',
      'login_logs',
      'marks',
      'messages',
      'parents',
      'period_settings',
      'school_admins',
      'student_attendance',
      'students',
      'subjects',
      'teacher_attendance',
      'teachers',
      'timetables',
      'roles',
      'permissions',
      'schools',
      ,
    ];
    await queryInterface.bulkInsert(
      'permissions',
      entities.flatMap(createPermissions),
    );
    await queryInterface.bulkInsert('permissions', [
      {
        id: getId(`READ_API_DOCS`),
        createdAt,
        updatedAt,
        name: `READ_API_DOCS`,
      },
    ]);
    await queryInterface.bulkInsert('permissions', [
      {
        id: getId(`CREATE_SEARCH`),
        createdAt,
        updatedAt,
        name: `CREATE_SEARCH`,
      },
    ]);

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

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

    await queryInterface.bulkInsert('rolesPermissionsPermissions', [
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_USERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('READ_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('READ_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_CLASS_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        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('Learner'),
        permissionId: getId('UPDATE_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_CLASS_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        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('Learner'),
        permissionId: getId('UPDATE_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_CLASSES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('READ_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('READ_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_MARKS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        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('Learner'),
        permissionId: getId('READ_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('READ_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_MESSAGES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('READ_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_STUDENT_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_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('Learner'),
        permissionId: getId('READ_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_STUDENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        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('Learner'),
        permissionId: getId('UPDATE_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('READ_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('UPDATE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('UPDATE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('UPDATE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_TEACHERS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('READ_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('UPDATE_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('DELETE_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('READ_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        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('Learner'),
        permissionId: getId('UPDATE_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        permissionId: getId('UPDATE_TIMETABLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SystemOverseer'),
        permissionId: getId('CREATE_SEARCH'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('EducationManager'),
        permissionId: getId('CREATE_SEARCH'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('AcademicCoordinator'),
        permissionId: getId('CREATE_SEARCH'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Learner'),
        permissionId: getId('CREATE_SEARCH'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Guardian'),
        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_ACTIVITY_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_ACTIVITY_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_ACTIVITY_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_ASSIGNMENT_SUBMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_ASSIGNMENT_SUBMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_ASSIGNMENT_SUBMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_ASSIGNMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_ASSIGNMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_ASSIGNMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_BILLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_BILLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_BILLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_CLASS_MESSAGES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_CLASS_MESSAGES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_CLASS_MESSAGES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_CLASS_MESSAGES'),
      },

      {
        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_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_EXAM_SUBJECTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_EXAM_SUBJECTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_EXAM_SUBJECTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_EXAMS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_EXAMS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_EXAMS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_FEE_PAYMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_FEE_PAYMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_FEE_PAYMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_FEE_STRUCTURES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_FEE_STRUCTURES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_FEE_STRUCTURES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_LESSON_PLANS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_LESSON_PLANS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_LESSON_PLANS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_LOGIN_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_LOGIN_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_LOGIN_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_MARKS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_MARKS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_MARKS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_MARKS'),
      },

      {
        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_PARENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_PARENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_PARENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_PERIOD_SETTINGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_PERIOD_SETTINGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_PERIOD_SETTINGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_SCHOOL_ADMINS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_SCHOOL_ADMINS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_SCHOOL_ADMINS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_STUDENT_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_STUDENT_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_STUDENT_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_STUDENT_ATTENDANCE'),
      },

      {
        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_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_TEACHER_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_TEACHER_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_TEACHER_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('CREATE_TEACHERS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('READ_TEACHERS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('UPDATE_TEACHERS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('Administrator'),
        permissionId: getId('DELETE_TEACHERS'),
      },

      {
        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('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_ACTIVITY_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_ACTIVITY_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_ACTIVITY_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_ACTIVITY_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_ASSIGNMENT_SUBMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_ASSIGNMENT_SUBMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_ASSIGNMENT_SUBMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_ASSIGNMENT_SUBMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_ASSIGNMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_ASSIGNMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_ASSIGNMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_ASSIGNMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_BILLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_BILLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_BILLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_BILLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_CLASS_MESSAGES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_CLASS_MESSAGES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_CLASS_MESSAGES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_CLASS_MESSAGES'),
      },

      {
        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_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_EXAM_SUBJECTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_EXAM_SUBJECTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_EXAM_SUBJECTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_EXAM_SUBJECTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_EXAMS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_EXAMS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_EXAMS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_EXAMS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_FEE_PAYMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_FEE_PAYMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_FEE_PAYMENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_FEE_PAYMENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_FEE_STRUCTURES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_FEE_STRUCTURES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_FEE_STRUCTURES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_FEE_STRUCTURES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_LESSON_PLANS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_LESSON_PLANS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_LESSON_PLANS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_LESSON_PLANS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_LOGIN_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_LOGIN_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_LOGIN_LOGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_LOGIN_LOGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_MARKS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_MARKS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_MARKS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_MARKS'),
      },

      {
        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_PARENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_PARENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_PARENTS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_PARENTS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_PERIOD_SETTINGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_PERIOD_SETTINGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_PERIOD_SETTINGS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_PERIOD_SETTINGS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_SCHOOL_ADMINS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_SCHOOL_ADMINS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_SCHOOL_ADMINS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_SCHOOL_ADMINS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_STUDENT_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_STUDENT_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_STUDENT_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_STUDENT_ATTENDANCE'),
      },

      {
        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_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_TEACHER_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_TEACHER_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_TEACHER_ATTENDANCE'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_TEACHER_ATTENDANCE'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_TEACHERS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_TEACHERS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_TEACHERS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_TEACHERS'),
      },

      {
        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_ROLES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_ROLES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_ROLES'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_ROLES'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_PERMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_PERMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_PERMISSIONS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_PERMISSIONS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('CREATE_SCHOOLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('READ_SCHOOLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('UPDATE_SCHOOLS'),
      },
      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('DELETE_SCHOOLS'),
      },

      {
        createdAt,
        updatedAt,
        roles_permissionsId: getId('SuperAdmin'),
        permissionId: getId('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(
        'SystemOverseer',
      )}' WHERE "email"='client@hello.com'`,
    );
    await queryInterface.sequelize.query(
      `UPDATE "users" SET "app_roleId"='${getId(
        'EducationManager',
      )}' WHERE "email"='john@doe.com'`,
    );
  },
};
