-- ============================================================
-- FEESPAY.COM.NG — Complete Database Schema
-- Database: feespay_db
-- Platform: phpMyAdmin / MySQL 8.0+
-- Created for: admins.feespay.com.ng
-- ============================================================

SET time_zone = "+01:00";  -- Nigeria WAT

-- Create and select database
CREATE DATABASE IF NOT EXISTS `feespay_db`
    CHARACTER SET utf8mb4
    COLLATE utf8mb4_unicode_ci;

USE `feespay_db`;

-- ────────────────────────────────────────────────────────────
-- TABLE 1: schools
-- Stores every registered school
-- ────────────────────────────────────────────────────────────
CREATE TABLE `schools` (
    `id`                        BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `uid`                       VARCHAR(36)     NOT NULL COMMENT 'UUID for registration flow',
    `portal_id`                 VARCHAR(10)     NOT NULL COMMENT 'e.g. FPS001 — shown on dashboard',
    `school_name`               VARCHAR(150)    NOT NULL,
    `phone`                     VARCHAR(15)     NOT NULL,
    `email`                     VARCHAR(150)    NOT NULL,
    `school_type`               ENUM('nursery_primary','secondary','tertiary') NOT NULL,
    `referral_code`             VARCHAR(20)     NULL,

    -- Business profile fields
    `logo`                      VARCHAR(255)    NULL,
    `business_name`             VARCHAR(150)    NULL,
    `business_category`         VARCHAR(100)    NULL DEFAULT 'School',
    `school_board`              VARCHAR(100)    NULL COMMENT 'Private School, Methodist, etc.',
    `state`                     VARCHAR(60)     NULL,
    `lga`                       VARCHAR(80)     NULL,
    `address`                   TEXT            NULL,
    `tin_number`                VARCHAR(20)     NULL COMMENT 'Tax Identification Number',

    -- Settlement bank details
    `settlement_bank`           VARCHAR(100)    NULL,
    `settlement_bank_code`      VARCHAR(10)     NULL,
    `settlement_account_number` VARCHAR(10)     NULL,
    `settlement_account_name`   VARCHAR(150)    NULL,

    -- BVN verification
    `bvn_submitted`             TINYINT(1)      NOT NULL DEFAULT 0,
    `bvn_verified`              TINYINT(1)      NOT NULL DEFAULT 0,
    `bvn_hash`                  VARCHAR(255)    NULL COMMENT 'Hashed BVN — never store plain',

    -- Activation
    `status`                    ENUM('pending','registered','active','suspended') NOT NULL DEFAULT 'pending',
    `compliance_status`         ENUM('pending','reviewing','approved','rejected')  NOT NULL DEFAULT 'pending',
    `activation_percentage`     TINYINT         NOT NULL DEFAULT 0,
    `activation_fee_paid`       TINYINT(1)      NOT NULL DEFAULT 0,
    `activation_fee_reference`  VARCHAR(100)    NULL,

    -- Timestamps
    `phone_verified_at`         TIMESTAMP       NULL,
    `activated_at`              TIMESTAMP       NULL,
    `created_at`                TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`                TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    UNIQUE KEY `schools_uid_unique`      (`uid`),
    UNIQUE KEY `schools_portal_id_unique`(`portal_id`),
    UNIQUE KEY `schools_phone_unique`    (`phone`),
    UNIQUE KEY `schools_email_unique`    (`email`),
    INDEX `schools_status_idx`           (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 2: school_admins
-- Login accounts for school staff
-- ────────────────────────────────────────────────────────────
CREATE TABLE `school_admins` (
    `id`            BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `school_id`     BIGINT UNSIGNED NOT NULL,
    `name`          VARCHAR(100)    NOT NULL,
    `email`         VARCHAR(150)    NOT NULL,
    `phone`         VARCHAR(15)     NOT NULL,
    `pin_hash`      VARCHAR(255)    NOT NULL COMMENT 'bcrypt hash of 6-digit PIN',
    `role`          ENUM('admin','accountant','teacher') NOT NULL DEFAULT 'admin',
    `is_active`     TINYINT(1)      NOT NULL DEFAULT 1,
    `last_login_at` TIMESTAMP       NULL,
    `created_at`    TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`    TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    UNIQUE KEY `admins_phone_unique` (`phone`),
    UNIQUE KEY `admins_email_unique` (`email`),
    FOREIGN KEY (`school_id`) REFERENCES `schools`(`id`) ON DELETE CASCADE,
    INDEX `admins_school_idx` (`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 3: school_classes
-- Classes/grade levels per school
-- ────────────────────────────────────────────────────────────
CREATE TABLE `school_classes` (
    `id`         BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `school_id`  BIGINT UNSIGNED NOT NULL,
    `name`       VARCHAR(80)     NOT NULL COMMENT 'e.g. Day Care, PG1, Grade 1',
    `category`   VARCHAR(60)     NOT NULL DEFAULT 'Primary' COMMENT 'Primary, Secondary, etc.',
    `sort_order` SMALLINT        NOT NULL DEFAULT 0,
    `created_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    FOREIGN KEY (`school_id`) REFERENCES `schools`(`id`) ON DELETE CASCADE,
    INDEX `classes_school_idx` (`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 4: students
-- Every student across all schools
-- ────────────────────────────────────────────────────────────
CREATE TABLE `students` (
    `id`                     BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `school_id`              BIGINT UNSIGNED NOT NULL,
    `class_id`               BIGINT UNSIGNED NOT NULL,
    `name`                   VARCHAR(150)    NOT NULL,
    `reg_number`             VARCHAR(20)     NOT NULL COMMENT 'Auto-generated unique reg number',
    `gender`                 ENUM('male','female') NOT NULL,
    `parent_phone`           VARCHAR(15)     NOT NULL,
    `parent_whatsapp`        VARCHAR(15)     NULL,
    `parent_email`           VARCHAR(150)    NULL,

    -- Monnify virtual account
    `virtual_account_number` VARCHAR(20)     NULL,
    `virtual_bank_name`      VARCHAR(80)     NULL COMMENT 'e.g. Moniepoint',
    `virtual_account_ref`    VARCHAR(100)    NULL COMMENT 'Monnify account reference',

    `status`                 ENUM('active','graduated','archived') NOT NULL DEFAULT 'active',
    `payment_instruction_sent` TINYINT(1)   NOT NULL DEFAULT 0,
    `created_at`             TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`             TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    UNIQUE KEY `students_reg_unique`     (`reg_number`),
    FOREIGN KEY (`school_id`) REFERENCES `schools`(`id`)       ON DELETE CASCADE,
    FOREIGN KEY (`class_id`)  REFERENCES `school_classes`(`id`) ON DELETE RESTRICT,
    INDEX `students_school_idx`          (`school_id`),
    INDEX `students_class_idx`           (`class_id`),
    INDEX `students_parent_phone_idx`    (`parent_phone`),
    INDEX `students_virtual_account_idx` (`virtual_account_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 5: fees
-- Fee amounts set per class per term per session
-- ────────────────────────────────────────────────────────────
CREATE TABLE `fees` (
    `id`           BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `school_id`    BIGINT UNSIGNED NOT NULL,
    `class_id`     BIGINT UNSIGNED NOT NULL,
    `fee_type`     VARCHAR(80)     NOT NULL DEFAULT 'School Fees' COMMENT 'School Fees, Bus Fees, Feeding, etc.',
    `amount`       DECIMAL(12,2)   NOT NULL DEFAULT 0.00,
    `session`      VARCHAR(12)     NOT NULL COMMENT 'e.g. 2025/2026',
    `term`         ENUM('First Term','Second Term','Third Term') NOT NULL,
    `is_active`    TINYINT(1)      NOT NULL DEFAULT 1,
    `created_at`   TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`   TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    FOREIGN KEY (`school_id`) REFERENCES `schools`(`id`)        ON DELETE CASCADE,
    FOREIGN KEY (`class_id`)  REFERENCES `school_classes`(`id`) ON DELETE CASCADE,
    INDEX `fees_school_session_term_idx` (`school_id`, `session`, `term`),
    UNIQUE KEY `fees_unique_per_class` (`school_id`, `class_id`, `fee_type`, `session`, `term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 6: transactions
-- Every payment received — populated from Monnify webhooks
-- ────────────────────────────────────────────────────────────
CREATE TABLE `transactions` (
    `id`                BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `student_id`        BIGINT UNSIGNED NOT NULL,
    `school_id`         BIGINT UNSIGNED NOT NULL,
    `fee_id`            BIGINT UNSIGNED NULL,
    `reference`         VARCHAR(100)    NOT NULL COMMENT 'Monnify transaction reference',
    `amount_expected`   DECIMAL(12,2)   NOT NULL,
    `amount_paid`       DECIMAL(12,2)   NOT NULL DEFAULT 0.00,
    `convenience_fee`   DECIMAL(10,2)   NOT NULL DEFAULT 500.00,
    `balance`           DECIMAL(12,2)   NOT NULL DEFAULT 0.00,
    `status`            ENUM('pending','approved','part-payment','failed') NOT NULL DEFAULT 'pending',
    `settlement_status` ENUM('pending','settled') NOT NULL DEFAULT 'pending',
    `payment_gateway`   VARCHAR(30)     NOT NULL DEFAULT 'monnify',
    `payment_channel`   VARCHAR(50)     NULL COMMENT 'USSD, Transfer, etc.',
    `payer_bank`        VARCHAR(80)     NULL,
    `session`           VARCHAR(12)     NOT NULL,
    `term`              ENUM('First Term','Second Term','Third Term') NOT NULL,
    `paid_at`           TIMESTAMP       NULL,
    `settled_at`        TIMESTAMP       NULL,
    `created_at`        TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`        TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    UNIQUE KEY `transactions_reference_unique` (`reference`),
    FOREIGN KEY (`student_id`) REFERENCES `students`(`id`) ON DELETE RESTRICT,
    FOREIGN KEY (`school_id`)  REFERENCES `schools`(`id`)  ON DELETE RESTRICT,
    FOREIGN KEY (`fee_id`)     REFERENCES `fees`(`id`)     ON DELETE SET NULL,
    INDEX `transactions_school_idx`           (`school_id`),
    INDEX `transactions_student_idx`          (`student_id`),
    INDEX `transactions_status_idx`           (`status`),
    INDEX `transactions_settlement_idx`       (`settlement_status`),
    INDEX `transactions_session_term_idx`     (`session`, `term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 7: receipts
-- PDF receipts generated per transaction
-- ────────────────────────────────────────────────────────────
CREATE TABLE `receipts` (
    `id`             BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `transaction_id` BIGINT UNSIGNED NOT NULL,
    `file_path`      VARCHAR(255)    NOT NULL,
    `sent_whatsapp`  TINYINT(1)      NOT NULL DEFAULT 0,
    `sent_email`     TINYINT(1)      NOT NULL DEFAULT 0,
    `sent_at`        TIMESTAMP       NULL,
    `created_at`     TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`     TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    FOREIGN KEY (`transaction_id`) REFERENCES `transactions`(`id`) ON DELETE CASCADE,
    INDEX `receipts_transaction_idx` (`transaction_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 8: reminders
-- Log of every WhatsApp/SMS reminder sent to parents
-- ────────────────────────────────────────────────────────────
CREATE TABLE `reminders` (
    `id`         BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `student_id` BIGINT UNSIGNED NOT NULL,
    `school_id`  BIGINT UNSIGNED NOT NULL,
    `channel`    ENUM('whatsapp','sms','email') NOT NULL DEFAULT 'whatsapp',
    `message`    TEXT            NOT NULL,
    `status`     ENUM('sent','failed') NOT NULL DEFAULT 'sent',
    `sent_at`    TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `created_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    FOREIGN KEY (`student_id`) REFERENCES `students`(`id`) ON DELETE CASCADE,
    FOREIGN KEY (`school_id`)  REFERENCES `schools`(`id`)  ON DELETE CASCADE,
    INDEX `reminders_student_idx` (`student_id`),
    INDEX `reminders_school_idx`  (`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 9: academic_sessions
-- Academic year sessions managed by school
-- ────────────────────────────────────────────────────────────
CREATE TABLE `academic_sessions` (
    `id`           BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `school_id`    BIGINT UNSIGNED NOT NULL,
    `session`      VARCHAR(12)     NOT NULL COMMENT 'e.g. 2025/2026',
    `current_term` ENUM('First Term','Second Term','Third Term') NOT NULL DEFAULT 'First Term',
    `is_active`    TINYINT(1)      NOT NULL DEFAULT 0,
    `start_date`   DATE            NULL,
    `end_date`     DATE            NULL,
    `created_at`   TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`   TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    FOREIGN KEY (`school_id`) REFERENCES `schools`(`id`) ON DELETE CASCADE,
    INDEX `sessions_school_idx` (`school_id`),
    UNIQUE KEY `sessions_school_session_unique` (`school_id`, `session`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 10: school_documents
-- CAC docs, utility bills, etc. uploaded by school
-- ────────────────────────────────────────────────────────────
CREATE TABLE `school_documents` (
    `id`           BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `school_id`    BIGINT UNSIGNED NOT NULL,
    `doc_type`     VARCHAR(80)     NOT NULL COMMENT 'cac_certificate, cac_form2, etc.',
    `file_path`    VARCHAR(255)    NOT NULL,
    `file_name`    VARCHAR(150)    NOT NULL,
    `uploaded_at`  TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `created_at`   TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`   TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    FOREIGN KEY (`school_id`) REFERENCES `schools`(`id`) ON DELETE CASCADE,
    INDEX `docs_school_idx` (`school_id`),
    UNIQUE KEY `docs_school_type_unique` (`school_id`, `doc_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 11: school_directors
-- Directors info for business activation
-- ────────────────────────────────────────────────────────────
CREATE TABLE `school_directors` (
    `id`         BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `school_id`  BIGINT UNSIGNED NOT NULL,
    `full_name`  VARCHAR(150)    NOT NULL,
    `bvn_hash`   VARCHAR(255)    NOT NULL COMMENT 'Hashed BVN — never store plain',
    `dob`        DATE            NULL,
    `created_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    FOREIGN KEY (`school_id`) REFERENCES `schools`(`id`) ON DELETE CASCADE,
    INDEX `directors_school_idx` (`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 12: webhook_logs
-- Every webhook received from Monnify — for debugging
-- ────────────────────────────────────────────────────────────
CREATE TABLE `webhook_logs` (
    `id`         BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `source`     VARCHAR(30)     NOT NULL DEFAULT 'monnify',
    `payload`    JSON            NOT NULL,
    `reference`  VARCHAR(100)    NULL,
    `status`     ENUM('received','processed','failed','duplicate') NOT NULL DEFAULT 'received',
    `error`      TEXT            NULL,
    `created_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    INDEX `webhook_reference_idx` (`reference`),
    INDEX `webhook_status_idx`    (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 13: super_admins
-- FeespPay.ng internal admin accounts (you)
-- ────────────────────────────────────────────────────────────
CREATE TABLE `super_admins` (
    `id`            BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `name`          VARCHAR(100)    NOT NULL,
    `email`         VARCHAR(150)    NOT NULL,
    `password_hash` VARCHAR(255)    NOT NULL,
    `is_active`     TINYINT(1)      NOT NULL DEFAULT 1,
    `last_login_at` TIMESTAMP       NULL,
    `created_at`    TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at`    TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    UNIQUE KEY `superadmin_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 14: password_resets
-- For PIN reset flow
-- ────────────────────────────────────────────────────────────
CREATE TABLE `password_resets` (
    `phone`      VARCHAR(15)  NOT NULL,
    `token`      VARCHAR(255) NOT NULL,
    `created_at` TIMESTAMP    NOT NULL DEFAULT CURRENT_TIMESTAMP,

    PRIMARY KEY (`phone`),
    INDEX `reset_phone_idx` (`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- TABLE 15: platform_settings
-- Global settings for the platform
-- ────────────────────────────────────────────────────────────
CREATE TABLE `platform_settings` (
    `id`           INT UNSIGNED    NOT NULL AUTO_INCREMENT,
    `setting_key`  VARCHAR(80)     NOT NULL,
    `setting_value`TEXT            NOT NULL,
    `description`  VARCHAR(255)    NULL,
    `updated_at`   TIMESTAMP       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    PRIMARY KEY (`id`),
    UNIQUE KEY `settings_key_unique` (`setting_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ────────────────────────────────────────────────────────────
-- DEFAULT DATA — Insert after tables created
-- ────────────────────────────────────────────────────────────

-- Default platform settings
INSERT INTO `platform_settings` (`setting_key`, `setting_value`, `description`) VALUES
('convenience_fee',   '500',         'Flat convenience fee added to each parent payment (Naira)'),
('activation_fee',    '25000',       'One-time school signup/activation fee (Naira)'),
('current_session',   '2025/2026',   'Current academic session'),
('current_term',      'Third Term',  'Current academic term'),
('platform_name',     'FeespPay.ng', 'Platform display name'),
('support_email',     'hello@feespay.com.ng', 'Support email address'),
('support_phone',     '08000000000', 'Support phone number'),
('monnify_env',       'sandbox',     'sandbox or live'),
('settlement_day',    'T+1',         'Settlement timing');

-- Super admin account (YOU)
-- Password: Change this immediately after first login
-- Default password here is: Admin@12345 (bcrypt hash below)
INSERT INTO `super_admins` (`name`, `email`, `password_hash`) VALUES
('Fanny Onyemachi', 'admin@feespay.com.ng',
 '$2y$12$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uDutXL42y');

-- Note: Default password is "Admin@12345"
-- CHANGE THIS IMMEDIATELY after first login via:
-- UPDATE super_admins SET password_hash = '$2y$12$...' WHERE email = 'admin@feespay.com.ng';
