Import with phpMyAdmin: Import → choose the downloaded file → Go. It creates the database campusbridge_uaf with all 13 tables, the 8 default roles, the 7 services and the starting campuses. For a database that already exists, run update_to_v2.sql (databases older than the campuses feature: run update_campuses_departments.sql first).
-- ============================================================================ -- CampusBridge UAF - Clean database script, version 2.0 (structure + safe starter data) -- 13 tables: includes campuses, departments, staff campus access and login throttling. -- Matches the current PHP site (Student E-Services Portal v2.0, database/schema.sql). -- For an EXISTING version 1.0 database use update_to_v2.sql instead. -- (Databases older than the campuses feature: run update_campuses_departments.sql first.) -- MySQL 8 / MariaDB 10.4+ | InnoDB, utf8mb4 -- Import in phpMyAdmin (Import tab) or: mysql -u root -p < campusbridge_uaf_schema.sql -- NOTE: no real passwords or SMTP secrets are stored here. After importing: -- 1) run scripts/reset_admin_password.php (or scripts/create_superadmin.php) once to set -- the Super Admin password - the placeholder below cannot be used to log in -- 2) enter SMTP details from Admin > Site Settings -- ============================================================================ CREATE DATABASE IF NOT EXISTS `campusbridge_uaf` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; USE `campusbridge_uaf`; SET FOREIGN_KEY_CHECKS = 0; -- ---------- roles (system roles and custom roles) ---------- CREATE TABLE `roles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL COMMENT 'e.g., it_admin, super_admin', `display_name` varchar(100) NOT NULL COMMENT 'e.g., IT Admin', `description` varchar(255) DEFAULT NULL, `is_system` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 = protected from deletion', `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 `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- campuses (Main Campus and sub-campuses) ---------- CREATE TABLE `campuses` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(150) NOT NULL, `code` varchar(20) NOT NULL, `address` varchar(255) DEFAULT 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`), UNIQUE KEY `uniq_campus_code` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- departments (each belongs to one campus) ---------- CREATE TABLE `departments` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `campus_id` int(10) unsigned NOT NULL, `name` varchar(150) NOT NULL, `code` varchar(20) DEFAULT 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`), KEY `idx_dept_campus` (`campus_id`), KEY `idx_dept_name` (`name`), CONSTRAINT `fk_dept_campus` FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- users (students, staff, campus admins and the Super Admin) ---------- CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `reg_no` varchar(20) NOT NULL COMMENT 'e.g. 2023-ag-10110, NULL pattern enforced in app for staff', `name` varchar(120) NOT NULL, `personal_email` varchar(150) NOT NULL, `phone` varchar(20) DEFAULT NULL, `cnic` varchar(15) DEFAULT NULL COMMENT 'Format: 12345-1234567-8', `degree_level` enum('BS','MS','MPhil','PhD','N/A') NOT NULL DEFAULT 'N/A', `department` varchar(120) DEFAULT NULL, `campus_id` int(10) unsigned DEFAULT NULL, `department_id` int(10) unsigned DEFAULT NULL, `password` varchar(255) NOT NULL COMMENT 'password_hash() output', `role` varchar(50) NOT NULL DEFAULT 'student', `status` enum('active','inactive') NOT NULL DEFAULT 'active', `created_by` int(10) unsigned DEFAULT NULL COMMENT 'super admin who provisioned this staff account', `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `password_changed_at` datetime DEFAULT NULL, `must_change_password` tinyint(1) NOT NULL DEFAULT 0, `manageable_statuses` varchar(255) DEFAULT NULL COMMENT 'JSON list of request statuses this staff member may manage; NULL = all', PRIMARY KEY (`id`), UNIQUE KEY `reg_no` (`reg_no`), UNIQUE KEY `personal_email` (`personal_email`), UNIQUE KEY `uniq_users_cnic` (`cnic`), KEY `fk_users_created_by` (`created_by`), KEY `idx_users_role` (`role`), KEY `idx_users_reg_no` (`reg_no`), KEY `idx_users_campus` (`campus_id`), KEY `idx_users_department_id` (`department_id`), CONSTRAINT `fk_users_campus` FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`id`) ON DELETE SET NULL, CONSTRAINT `fk_users_created_by` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL, CONSTRAINT `fk_users_department_id` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL, CONSTRAINT `fk_users_role` FOREIGN KEY (`role`) REFERENCES `roles` (`name`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- service_configurations (one row per e-service, form fields stored as JSON) ---------- CREATE TABLE `service_configurations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `service_type` varchar(50) NOT NULL, `service_title` varchar(150) NOT NULL, `is_enabled` tinyint(1) NOT NULL DEFAULT 1, `guidance_instructions` text DEFAULT NULL, `downloadable_form_path` varchar(255) DEFAULT NULL COMMENT 'admin-uploaded PDF/DOCX template', `fee_amount` decimal(10,2) DEFAULT NULL COMMENT 'informational only; display next to guidance', `required_fields_json` longtext DEFAULT NULL COMMENT 'JSON array describing ALL admin-defined form fields (text/number/date/select/textarea/file) -- no fields are hardcoded', `admin_completion_fields_json` longtext DEFAULT NULL, `updated_by` int(10) unsigned DEFAULT NULL, `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `completion_message_template` text DEFAULT NULL, `allowed_admin_roles` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- service_requests (every student application) ---------- CREATE TABLE `service_requests` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `tracking_code` varchar(20) NOT NULL COMMENT 'e.g. CB-WIFI-000123', `user_id` int(10) unsigned NOT NULL, `service_type` varchar(50) NOT NULL, `campus_id` int(10) unsigned DEFAULT NULL, `status` enum('Pending','Under_Review','Completed','Rejected','Returned') NOT NULL DEFAULT 'Pending', `submitted_data_json` longtext DEFAULT NULL COMMENT 'JSON: dynamic text/number/date/select/textarea field answers', `uploaded_files_json` longtext DEFAULT NULL COMMENT 'JSON object {field_name: stored_relative_path} for every admin-defined file-upload field', `admin_remarks` text DEFAULT NULL, `reviewed_by` int(10) unsigned DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `completion_message` text DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `tracking_code` (`tracking_code`), KEY `fk_req_reviewer` (`reviewed_by`), KEY `idx_req_status` (`status`), KEY `idx_req_service` (`service_type`), KEY `idx_req_user` (`user_id`), KEY `idx_sr_campus` (`campus_id`), CONSTRAINT `fk_req_reviewer` FOREIGN KEY (`reviewed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL, CONSTRAINT `fk_req_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_sr_campus` FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- credentials_dispatch (login details generated on completion) ---------- CREATE TABLE `credentials_dispatch` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `request_id` int(10) unsigned NOT NULL, `generated_login` varchar(150) NOT NULL, `generated_password` varchar(100) NOT NULL COMMENT 'plaintext shown once, then emailed - not the account password hash', `sent_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), KEY `fk_cred_request` (`request_id`), CONSTRAINT `fk_cred_request` FOREIGN KEY (`request_id`) REFERENCES `service_requests` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- audit_logs (who did what, when) ---------- CREATE TABLE `audit_logs` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `admin_id` int(10) unsigned DEFAULT NULL, `action_performed` varchar(255) NOT NULL, `target_request_id` int(10) unsigned DEFAULT NULL, `ip_address` varchar(45) DEFAULT NULL, `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), KEY `fk_audit_admin` (`admin_id`), KEY `fk_audit_request` (`target_request_id`), CONSTRAINT `fk_audit_admin` FOREIGN KEY (`admin_id`) REFERENCES `users` (`id`) ON DELETE SET NULL, CONSTRAINT `fk_audit_request` FOREIGN KEY (`target_request_id`) REFERENCES `service_requests` (`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- staff_campuses (campuses each staff member / campus admin may manage) ---------- CREATE TABLE `staff_campuses` ( `staff_id` int(10) unsigned NOT NULL, `campus_id` int(10) unsigned NOT NULL, PRIMARY KEY (`staff_id`,`campus_id`), KEY `idx_sc_campus` (`campus_id`), CONSTRAINT `fk_sc_campus` FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_sc_staff` FOREIGN KEY (`staff_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- auth_throttle (brute-force protection: failed-attempt counters and lockouts) ---------- CREATE TABLE `auth_throttle` ( `scope` varchar(40) NOT NULL, `key_hash` char(64) NOT NULL, `attempts` int(10) unsigned NOT NULL DEFAULT 0, `window_start` int(10) unsigned NOT NULL DEFAULT 0, `locked_until` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`scope`,`key_hash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- password_resets (forgot-password OTP records) ---------- CREATE TABLE `password_resets` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, `otp_hash` varchar(255) NOT NULL COMMENT 'password_hash() of the 6-digit OTP -- never stored in plaintext', `expires_at` datetime NOT NULL, `attempts` tinyint(3) unsigned NOT NULL DEFAULT 0, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), KEY `idx_pwreset_user` (`user_id`), CONSTRAINT `fk_pwreset_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- email_verifications (registration OTP records) ---------- CREATE TABLE `email_verifications` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(150) NOT NULL, `otp_hash` varchar(255) NOT NULL, `expires_at` datetime NOT NULL, `attempts` tinyint(3) unsigned NOT NULL DEFAULT 0, `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'Stores pending registration data', `created_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- ---------- site_settings (single row, id = 1) ---------- CREATE TABLE `site_settings` ( `id` tinyint(3) unsigned NOT NULL DEFAULT 1, `site_name` varchar(150) NOT NULL DEFAULT 'CampusBridge UAF', `tagline` varchar(200) DEFAULT NULL, `logo_path` varchar(255) DEFAULT NULL COMMENT 'admin-uploaded logo, shown in header/footer/print forms', `contact_email` varchar(150) DEFAULT NULL, `contact_phone` varchar(30) DEFAULT NULL, `address` varchar(255) DEFAULT NULL, `website_url` varchar(255) DEFAULT NULL, `footer_note` varchar(255) DEFAULT NULL COMMENT 'short line shown in the site + form footer, e.g. office hours', `updated_by` int(10) unsigned DEFAULT NULL, `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `maintenance_mode` tinyint(1) NOT NULL DEFAULT 0, `maintenance_message` varchar(500) DEFAULT NULL, `maintenance_eta` datetime DEFAULT NULL, `email_verification_enabled` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1 = require OTP on student registration', `completion_email_enabled` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1 = send completion/status emails on review', `announcement_enabled` tinyint(1) NOT NULL DEFAULT 0, `announcement_text` varchar(500) DEFAULT NULL, `announcement_type` varchar(10) NOT NULL DEFAULT 'info', `smtp_enabled` tinyint(1) NOT NULL DEFAULT 1, `smtp_host` varchar(190) DEFAULT NULL, `smtp_port` smallint(5) unsigned NOT NULL DEFAULT 587, `smtp_encryption` varchar(10) NOT NULL DEFAULT 'tls', `smtp_username` varchar(190) DEFAULT NULL, `smtp_password` varchar(255) DEFAULT NULL, `smtp_from_email` varchar(190) DEFAULT NULL, `smtp_from_name` varchar(150) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_site_settings_updated_by` (`updated_by`), CONSTRAINT `fk_site_settings_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; SET FOREIGN_KEY_CHECKS = 1; -- ============================ STARTER DATA ================================== -- 8 default roles (7 are protected system roles; lms_admin is a normal role that can be edited) INSERT INTO `roles` (`name`,`display_name`,`description`,`is_system`) VALUES ('super_admin','Super Admin','Full access to everything',1), ('it_admin','IT Admin','Manages Wi-Fi and Email services',1), ('dsa_admin','DSA Admin','Manages Student ID Card service',1), ('library_admin','Library Admin','Manages Library Card service',1), ('exam_admin','Exam Admin','Manages DMC service',1), ('student','Student','Default role for students',1), ('lms_admin','LMS Admin','Manage LMS accounts and login credentials for students',0), ('campus_admin','Campus Admin','Manages all requests, students and reports of their assigned campus(es).',1); -- Sample campuses (edit or add more from Admin > Campuses) INSERT INTO `campuses` (`name`,`code`,`address`) VALUES ('Main Campus Faisalabad','FSD','Jail Road, Faisalabad'), ('Sub-Campus Burewala','BWL','Vehari Road, Burewala'), ('Sub-Campus Toba Tek Singh','TTS','Toba Tek Singh'); -- Sample departments (each belongs to one campus; add the rest from Admin > Campuses) INSERT INTO `departments` (`campus_id`,`name`,`code`) VALUES ((SELECT `id` FROM `campuses` WHERE `code` = 'FSD'),'Computer Science','CS'), ((SELECT `id` FROM `campuses` WHERE `code` = 'FSD'),'Physics','PHY'), ((SELECT `id` FROM `campuses` WHERE `code` = 'FSD'),'Chemistry','CHEM'), ((SELECT `id` FROM `campuses` WHERE `code` = 'FSD'),'Agriculture','AGRI'), ((SELECT `id` FROM `campuses` WHERE `code` = 'FSD'),'Zoology','ZOO'), ((SELECT `id` FROM `campuses` WHERE `code` = 'BWL'),'Computer Science','CS'), ((SELECT `id` FROM `campuses` WHERE `code` = 'BWL'),'Agriculture','AGRI'), ((SELECT `id` FROM `campuses` WHERE `code` = 'TTS'),'Computer Science','CS'), ((SELECT `id` FROM `campuses` WHERE `code` = 'TTS'),'Agriculture','AGRI'); -- Super Admin placeholder: the password value is NOT a valid hash, so nobody can log in with it. -- Set the real password with scripts/reset_admin_password.php (or create_superadmin.php). INSERT INTO `users` (`reg_no`,`name`,`personal_email`,`degree_level`,`password`,`role`,`status`) VALUES ('SA-0001','Super Administrator','superadmin@example.com','N/A','CHANGE_ME_RUN_RESET_SCRIPT','super_admin','active'); -- Single settings row (id = 1). Real SMTP user/password are entered from Admin > Site Settings. INSERT INTO `site_settings` (`id`,`site_name`,`tagline`,`footer_note`,`smtp_host`,`smtp_port`,`smtp_encryption`,`smtp_from_name`) VALUES (1,'University of Agriculture Faisalabad','Student E-Services','Built by UAF students as a final year project.','smtp.gmail.com',587,'tls','CampusBridge UAF'); -- The 7 default services. Form fields are JSON in required_fields_json, so a new service -- or field never needs a table change (Admin > Service Settings > Create new service). INSERT INTO `service_configurations` (`service_type`,`service_title`,`is_enabled`,`guidance_instructions`,`fee_amount`,`required_fields_json`,`admin_completion_fields_json`,`completion_message_template`,`allowed_admin_roles`) VALUES ('wifi','Campus Wi-Fi Access',1,'Fill in your Reg/AG number and upload a clear Student Card copy (JPG/PNG). \nYour student identity proof is required for network registration. \nApproval takes 1-3 working days.',NULL,'[{"name":"Reg","label":"Reg/AG No:","type":"text","required":true},{"name":"card","label":"Student Card (Front-back):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png","gif"],"max_files":2}]','[{"name":"wifi_password","label":"Wifi Password:"}]','Dear {student_name},\n\nYour {service_title} application ({tracking_code}) has been completed.\n\n{additional_details}\n\nYou can now connect to the campus Wi-Fi network using the credentials given.\n\nThank you for using CampusBridge UAF.','["it_admin","super_admin"]'), ('email','Official University Email',1,'Provide your student card, Reg/AG_No , Filled image of Email Application Form. \nYour official @uaf.edu.pk email account will be created within 2 working days.',NULL,'[{"name":"Reg","label":"Reg/AG No:","type":"text","required":true},{"name":"card_front","label":"Student Card (Front):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"card_back","label":"Student Card (Back);","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"Form","label":"Filled Application Form:","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]}]','[{"name":"Email","label":"University mail:"},{"name":"password","label":"Mail Password:"}]','Dear {student_name},\n\nYour {service_title} application ({tracking_code}) has been completed.\n\n{additional_details}\n\nPlease log in at mail.uaf.edu.pk and follow the steps to complete your profile.\n\nThank you for using CampusBridge UAF.','["it_admin","super_admin"]'), ('student_card','Student ID Card',1,'Fill your Reg/AG_No, Degree, Department.\nUpload a recent passport-size photograph (blue background preferred) ,\nyour paid fee voucher, CNIC and filled student_card Application form.\n Cards will be ready for collection in 5-7 working days \nfrom the DSA office and you will be notified.',500.00,'[{"name":"Reg","label":"Reg/AG No:","type":"text","required":true},{"name":"Degree","label":"Degree Program:","type":"text","required":true},{"name":"Department","label":"Department:","type":"select","required":true,"options":["CS","Physics","Chemistry","Agriculture","Zoology"]},{"name":"pic","label":"Passport size pic:","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"cnic","label":"CNIC (Front):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"fee_voucher","label":"Paid Fee voucher:","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"form","label":"Filled Application form:","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]}]','[]','Dear {student_name},\n\nYour {service_title} application ({tracking_code}) has been completed.\n\n{additional_details}\n\nPlease bring your original CNIC/Student ID when collecting your card.\n\nThank you for using CampusBridge UAF.','["dsa_admin","super_admin"]'), ('library_card','Library Membership Card',1,'Fill your Reg/AG_No, Degree, Department.\nAttach your paid library fee voucher and a valid student ID copy (front side).\nMembership will be activated within 3 working days.',200.00,'[{"name":"Reg","label":"Reg/AG No:","type":"text","required":true},{"name":"Degree","label":"Degree Program:","type":"text","required":true},{"name":"Department","label":"Department:","type":"select","required":true,"options":["CS","Physics","Chemistry","Agriculture","Zoology"]},{"name":"fee_voucher","label":"Paid Fee voucher:","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"card","label":"Student Card (Front):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]}]','[]','Dear {student_name},\n\nYour {service_title} application ({tracking_code}) has been completed.\n\n{additional_details}\n\nYou may now borrow books from the University Library.\n\nThank you for using CampusBridge UAF.','["library_admin","super_admin"]'), ('dmc','Detail Mark Certificate (DMC)',1,'Fill your Reg/AG_No, CNIC, Degree, Department. \nSelect your semester , attach your paid challan copy , filled application form, Student card (front) and CNIC (front).\nProcessing time: 5-7 working days. Collect from the Examination Branch.',300.00,'[{"name":"Reg","label":"Reg/AG No:","type":"text","required":true},{"name":"CNIC","label":"CNIC No","type":"text","required":true},{"name":"Degree","label":"Degree Program:","type":"text","required":true},{"name":"Department","label":"Department:","type":"select","required":true,"options":["CS","Physics","Chemistry","Agriculture","Zoology"]},{"name":"semester","label":"Semester:","type":"select","required":true,"options":["2nd","4th","6th","8th"]},{"name":"paid_voucher","label":"Paid Fee voucher:","type":"file","required":true,"allowed_ext":["jpg","jpeg","png","gif"],"max_files":1},{"name":"card_front","label":"Student Card (Front):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png","gif"],"max_files":1},{"name":"CNIC_Front","label":"CNIC (Front):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png","gif"],"max_files":1},{"name":"Form","label":"Filled Application Form","type":"file","required":true,"allowed_ext":["jpg","jpeg","png","gif"],"max_files":1}]','[]','Dear {student_name},\n\nYour {service_title} application ({tracking_code}) has been completed.\n\n{additional_details}\n\nPlease visit the Examination Branch with your original student ID to collect your DMC.\n\nThank you for using CampusBridge UAF.','["exam_admin","super_admin"]'), ('fees','Fees deferment/installments',1,'Fill your Reg/AG_No, CNIC, Degree, Department.\nSelect your semester and Upload your CNIC copy, Student card (front), and a written request for fee deferment or installment \nplan. Attach any supporting documents (e.g., reasons, \nmedical report). Decisions are made within 7 working days.',NULL,'[{"name":"Reg","label":"Reg/AG No:","type":"text","required":true},{"name":"CNIC","label":"CNIC No","type":"text","required":true},{"name":"Degree","label":"Degree Program:","type":"text","required":true},{"name":"Department","label":"Department:","type":"select","required":true,"options":["CS","Physics","Chemistry","Agriculture","Zoology"]},{"name":"semester","label":"Semester:","type":"select","required":true,"options":["1st","2nd","3rd","4th","5th","6th","7th","8th"]},{"name":"card","label":"Student Card (Front):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"CNIC_front","label":"CNIC (Front):","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]},{"name":"application","label":"Filled Application Form:","type":"file","required":true,"allowed_ext":["jpg","jpeg","png"]}]','[]','Dear {student_name},\n\nYour {service_title} application ({tracking_code}) has been processed.\n\n{additional_details}\n\nFor further queries, contact the Accounts Office.\n\nThank you for using CampusBridge UAF.','["it_admin","super_admin"]'), ('lms','LMS login credentials',1,'Enter your AG Number and upload a clear photo of your Student ID Card (front). \nYour LMS account will be created within 1 working day.',NULL,'[{"name":"Reg","label":"Reg/AG_No:","type":"text","required":true},{"name":"card","label":"Student_card (Front);","type":"file","required":false,"allowed_ext":["jpg","jpeg","png"]}]','[{"name":"lms_password","label":"LMS Password:"}]','Dear {student_name},\n\nYour {service_title} application ({tracking_code}) has been completed.\n\n{additional_details}\n\nPlease log in to the LMS using username as your Reg/AG_No and password as given.\n\nThank you for using CampusBridge UAF.','["lms_admin"]');
