-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 18, 2026 at 04:31 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `wsas`
--

-- --------------------------------------------------------

--
-- Table structure for table `admincourse`
--

CREATE TABLE `admincourse` (
  `course_id` int(255) NOT NULL,
  `course_code` varchar(255) NOT NULL,
  `course_name` varchar(255) NOT NULL,
  `major` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admincourse`
--

INSERT INTO `admincourse` (`course_id`, `course_code`, `course_name`, `major`, `is_active`) VALUES
(52, 'BSCS', 'Bachelor of Science in Computer Science', '', 0);

-- --------------------------------------------------------

--
-- Table structure for table `admindiscount`
--

CREATE TABLE `admindiscount` (
  `discount_id` int(255) NOT NULL,
  `discount_name` varchar(255) NOT NULL,
  `discount_amount` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admindiscount`
--

INSERT INTO `admindiscount` (`discount_id`, `discount_name`, `discount_amount`) VALUES
(8, 'Senior High School Alumni', 10),
(9, 'Full Payment', 20),
(10, 'Faculty/Staff Relatives', 15);

-- --------------------------------------------------------

--
-- Table structure for table `adminfee`
--

CREATE TABLE `adminfee` (
  `fee_id` int(255) NOT NULL,
  `fee_name` varchar(255) NOT NULL,
  `fee_amount` int(255) NOT NULL,
  `subject_fee` enum('Yes','No','Special') NOT NULL DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `adminfee`
--

INSERT INTO `adminfee` (`fee_id`, `fee_name`, `fee_amount`, `subject_fee`) VALUES
(22, 'Tuition Fee', 200, 'No'),
(23, 'Miscellaneous Fee', 6000, 'No'),
(24, 'Computer Laboratory Fee', 2000, 'Yes'),
(25, 'CWTS', 1000, 'Special');

-- --------------------------------------------------------

--
-- Table structure for table `adminstudent`
--

CREATE TABLE `adminstudent` (
  `student_id` int(255) NOT NULL,
  `student_id_num` varchar(255) NOT NULL,
  `f_name` varchar(255) NOT NULL,
  `l_name` varchar(255) NOT NULL,
  `m_name` varchar(255) NOT NULL,
  `suffix` varchar(10) NOT NULL,
  `sex` varchar(255) NOT NULL,
  `course_id` varchar(255) NOT NULL,
  `e_status` varchar(255) NOT NULL,
  `status_type` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `pword` varchar(255) NOT NULL,
  `sy_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `adminstudent`
--

INSERT INTO `adminstudent` (`student_id`, `student_id_num`, `f_name`, `l_name`, `m_name`, `suffix`, `sex`, `course_id`, `e_status`, `status_type`, `email`, `pword`, `sy_id`) VALUES
(26, '2025-001', 'Lei', 'Landicho', '', '', 'Female', '52', 'Regular', '', 'Itsmarelicious00@gmail.com', 'landicho-001', 23);

-- --------------------------------------------------------

--
-- Table structure for table `adminsubject`
--

CREATE TABLE `adminsubject` (
  `subject_id` int(255) NOT NULL,
  `subject_code` varchar(255) NOT NULL,
  `subject_name` varchar(255) NOT NULL,
  `lecture_unit` int(255) NOT NULL,
  `lab_unit` int(255) NOT NULL,
  `total_unit` int(255) NOT NULL,
  `pre_req` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `adminsubject`
--

INSERT INTO `adminsubject` (`subject_id`, `subject_code`, `subject_name`, `lecture_unit`, `lab_unit`, `total_unit`, `pre_req`) VALUES
(268, 'GenEd1', 'Understanding the Self', 3, 0, 3, ''),
(269, 'CSCC01', 'Introduction to Computing ', 2, 1, 3, ''),
(270, 'CSCC02', 'Fundamentals of Programming', 2, 1, 3, ''),
(271, 'CWTS 1', 'Civic Welfare Training Services 1', 2, 0, 2, '');

-- --------------------------------------------------------

--
-- Table structure for table `admin_login`
--

CREATE TABLE `admin_login` (
  `login_id` int(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `passwrod` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admin_login`
--

INSERT INTO `admin_login` (`login_id`, `email`, `passwrod`) VALUES
(3, 'admin@gmail.com', 'adminpass123');

-- --------------------------------------------------------

--
-- Table structure for table `admin_payment_account`
--

CREATE TABLE `admin_payment_account` (
  `payment_id` int(255) NOT NULL,
  `platform_type` varchar(255) NOT NULL,
  `payment_number` int(255) NOT NULL,
  `payment_name` varchar(255) NOT NULL,
  `payment_qr` blob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admin_payment_account`
--

INSERT INTO `admin_payment_account` (`payment_id`, `platform_type`, `payment_number`, `payment_name`, `payment_qr`) VALUES
(4, 'China Bank1', 912379041, 'Jap Lei Janna1', 0x313736343033353732322e6a7067);

-- --------------------------------------------------------

--
-- Table structure for table `course_subject`
--

CREATE TABLE `course_subject` (
  `corsub_id` int(255) NOT NULL,
  `course_id` varchar(255) NOT NULL,
  `subject_id` varchar(255) NOT NULL,
  `semester` varchar(255) NOT NULL,
  `year_level` enum('1st','2nd','3rd','4th') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `course_subject`
--

INSERT INTO `course_subject` (`corsub_id`, `course_id`, `subject_id`, `semester`, `year_level`) VALUES
(478, '52', '268', '1st', '1st'),
(479, '52', '269', '1st', '1st'),
(480, '52', '270', '1st', '1st'),
(481, '52', '271', '1st', '1st');

-- --------------------------------------------------------

--
-- Table structure for table `enroll_student`
--

CREATE TABLE `enroll_student` (
  `enroll_id` int(255) NOT NULL,
  `student_id` int(255) NOT NULL,
  `course_id` int(255) NOT NULL,
  `sy_id` int(255) NOT NULL,
  `semester` varchar(255) NOT NULL,
  `year_level` enum('1st','2nd','3rd','4th') NOT NULL,
  `date_enrolled` datetime NOT NULL DEFAULT current_timestamp(),
  `student_status` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `enroll_student`
--

INSERT INTO `enroll_student` (`enroll_id`, `student_id`, `course_id`, `sy_id`, `semester`, `year_level`, `date_enrolled`, `student_status`) VALUES
(13, 26, 52, 23, '1st Semester', '1st', '2026-03-18 02:14:28', 'Unpaid');

-- --------------------------------------------------------

--
-- Table structure for table `school_year`
--

CREATE TABLE `school_year` (
  `sy_id` int(255) NOT NULL,
  `sy_begin` varchar(255) NOT NULL,
  `sy_end` varchar(255) NOT NULL,
  `semester` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 0,
  `sy_history` datetime(6) NOT NULL DEFAULT current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `school_year`
--

INSERT INTO `school_year` (`sy_id`, `sy_begin`, `sy_end`, `semester`, `is_active`, `sy_history`) VALUES
(23, '2025', '2026', '1st Semester', 1, '2026-03-17 20:45:52.821025');

-- --------------------------------------------------------

--
-- Table structure for table `soa`
--

CREATE TABLE `soa` (
  `soa_id` int(255) NOT NULL,
  `enroll_id` int(255) NOT NULL,
  `subject_total_units` int(11) NOT NULL,
  `tuition_fee` int(255) NOT NULL,
  `misc_fee` int(255) NOT NULL,
  `special_fee` int(255) NOT NULL,
  `subj_fee` int(255) NOT NULL,
  `total_fee` int(255) NOT NULL,
  `down_payment` int(255) NOT NULL,
  `balance_fee` int(255) NOT NULL,
  `monthly_fee` int(255) NOT NULL,
  `soa_date` datetime(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `soa`
--

INSERT INTO `soa` (`soa_id`, `enroll_id`, `subject_total_units`, `tuition_fee`, `misc_fee`, `special_fee`, `subj_fee`, `total_fee`, `down_payment`, `balance_fee`, `monthly_fee`, `soa_date`) VALUES
(9, 13, 11, 1800, 6000, 1000, 2000, 10800, 2500, 8300, 2075, '2026-03-18 00:00:00.000000');

-- --------------------------------------------------------

--
-- Table structure for table `student_discount`
--

CREATE TABLE `student_discount` (
  `studisc_id` int(255) NOT NULL,
  `student_id` int(11) NOT NULL,
  `discount_id` int(11) NOT NULL,
  `sy_id` int(11) NOT NULL,
  `studisc_history` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `student_discount`
--

INSERT INTO `student_discount` (`studisc_id`, `student_id`, `discount_id`, `sy_id`, `studisc_history`) VALUES
(1, 26, 8, 0, '2026-03-18 00:21:55');

-- --------------------------------------------------------

--
-- Table structure for table `student_monthly_payment`
--

CREATE TABLE `student_monthly_payment` (
  `payment_id` int(255) NOT NULL,
  `soa_id` int(255) NOT NULL,
  `payment_amount` int(255) NOT NULL,
  `payment_date` datetime(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `student_payment`
--

CREATE TABLE `student_payment` (
  `sp_id` int(255) NOT NULL,
  `spay_amount` int(255) NOT NULL,
  `spay_image` blob NOT NULL,
  `spay_status` varchar(255) NOT NULL,
  `sy_id` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `student_subject`
--

CREATE TABLE `student_subject` (
  `student_subject_id` int(255) NOT NULL,
  `student_id` int(255) NOT NULL,
  `subject_id` int(255) NOT NULL,
  `subject_status` enum('Enrolled','Dropped','Completed','') NOT NULL DEFAULT 'Enrolled',
  `sy_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `student_subject`
--

INSERT INTO `student_subject` (`student_subject_id`, `student_id`, `subject_id`, `subject_status`, `sy_id`) VALUES
(77, 26, 268, 'Enrolled', 23),
(78, 26, 269, 'Enrolled', 23),
(79, 26, 270, 'Enrolled', 23),
(80, 26, 271, 'Enrolled', 23);

-- --------------------------------------------------------

--
-- Table structure for table `subject_fee`
--

CREATE TABLE `subject_fee` (
  `subfee_id` int(255) NOT NULL,
  `subject_id` int(255) NOT NULL,
  `fee_id` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `subject_fee`
--

INSERT INTO `subject_fee` (`subfee_id`, `subject_id`, `fee_id`) VALUES
(6, 270, 24),
(7, 271, 25);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admincourse`
--
ALTER TABLE `admincourse`
  ADD PRIMARY KEY (`course_id`);

--
-- Indexes for table `admindiscount`
--
ALTER TABLE `admindiscount`
  ADD PRIMARY KEY (`discount_id`);

--
-- Indexes for table `adminfee`
--
ALTER TABLE `adminfee`
  ADD PRIMARY KEY (`fee_id`);

--
-- Indexes for table `adminstudent`
--
ALTER TABLE `adminstudent`
  ADD PRIMARY KEY (`student_id`);

--
-- Indexes for table `adminsubject`
--
ALTER TABLE `adminsubject`
  ADD PRIMARY KEY (`subject_id`);

--
-- Indexes for table `admin_login`
--
ALTER TABLE `admin_login`
  ADD PRIMARY KEY (`login_id`);

--
-- Indexes for table `admin_payment_account`
--
ALTER TABLE `admin_payment_account`
  ADD PRIMARY KEY (`payment_id`);

--
-- Indexes for table `course_subject`
--
ALTER TABLE `course_subject`
  ADD PRIMARY KEY (`corsub_id`),
  ADD UNIQUE KEY `unique_assignment` (`course_id`,`subject_id`);

--
-- Indexes for table `enroll_student`
--
ALTER TABLE `enroll_student`
  ADD PRIMARY KEY (`enroll_id`);

--
-- Indexes for table `school_year`
--
ALTER TABLE `school_year`
  ADD PRIMARY KEY (`sy_id`);

--
-- Indexes for table `soa`
--
ALTER TABLE `soa`
  ADD PRIMARY KEY (`soa_id`);

--
-- Indexes for table `student_discount`
--
ALTER TABLE `student_discount`
  ADD PRIMARY KEY (`studisc_id`);

--
-- Indexes for table `student_monthly_payment`
--
ALTER TABLE `student_monthly_payment`
  ADD PRIMARY KEY (`payment_id`);

--
-- Indexes for table `student_payment`
--
ALTER TABLE `student_payment`
  ADD PRIMARY KEY (`sp_id`);

--
-- Indexes for table `student_subject`
--
ALTER TABLE `student_subject`
  ADD PRIMARY KEY (`student_subject_id`),
  ADD KEY `fk_student_subject_sy` (`sy_id`);

--
-- Indexes for table `subject_fee`
--
ALTER TABLE `subject_fee`
  ADD PRIMARY KEY (`subfee_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admincourse`
--
ALTER TABLE `admincourse`
  MODIFY `course_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;

--
-- AUTO_INCREMENT for table `admindiscount`
--
ALTER TABLE `admindiscount`
  MODIFY `discount_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `adminfee`
--
ALTER TABLE `adminfee`
  MODIFY `fee_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `adminstudent`
--
ALTER TABLE `adminstudent`
  MODIFY `student_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `adminsubject`
--
ALTER TABLE `adminsubject`
  MODIFY `subject_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=272;

--
-- AUTO_INCREMENT for table `admin_login`
--
ALTER TABLE `admin_login`
  MODIFY `login_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `admin_payment_account`
--
ALTER TABLE `admin_payment_account`
  MODIFY `payment_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `course_subject`
--
ALTER TABLE `course_subject`
  MODIFY `corsub_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=482;

--
-- AUTO_INCREMENT for table `enroll_student`
--
ALTER TABLE `enroll_student`
  MODIFY `enroll_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `school_year`
--
ALTER TABLE `school_year`
  MODIFY `sy_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `soa`
--
ALTER TABLE `soa`
  MODIFY `soa_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `student_discount`
--
ALTER TABLE `student_discount`
  MODIFY `studisc_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `student_monthly_payment`
--
ALTER TABLE `student_monthly_payment`
  MODIFY `payment_id` int(255) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `student_payment`
--
ALTER TABLE `student_payment`
  MODIFY `sp_id` int(255) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `student_subject`
--
ALTER TABLE `student_subject`
  MODIFY `student_subject_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=81;

--
-- AUTO_INCREMENT for table `subject_fee`
--
ALTER TABLE `subject_fee`
  MODIFY `subfee_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `student_subject`
--
ALTER TABLE `student_subject`
  ADD CONSTRAINT `fk_student_subject_sy` FOREIGN KEY (`sy_id`) REFERENCES `school_year` (`sy_id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
