-- https://www.phpmyadmin.net/
--

START TRANSACTION;



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

--
-- Table structure for table `myclasses`
--

CREATE TABLE `myclasses` (
  `classid` int(100) NOT NULL,
  `classname` varchar(255) NOT NULL,
  `status` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `myclasses`
--

INSERT INTO `myclasses` (`classid`, `classname`, `status`) VALUES
(1, 'Grade 7A', 1),
(2, 'Grade 7B', 1),
(4, 'Grade 6', 1);

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

--
-- Table structure for table `phoneverification`
--

CREATE TABLE `phoneverification` (
  `id` int(11) NOT NULL,
  `cell` int(8) NOT NULL,
  `stoken` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `regions`
--

CREATE TABLE `regions` (
  `regionid` int(100) NOT NULL,
  `regionname` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `regions`
--

INSERT INTO `regions` (`regionid`, `regionname`) VALUES
(1, 'Hhohho'),
(2, 'Manzini'),
(3, 'Lubombo'),
(4, 'Shiselweni');

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

--
-- Table structure for table `sitesetting`
--

CREATE TABLE `sitesetting` (
  `site_id` int(255) NOT NULL,
  `site_name` varchar(255) NOT NULL,
  `site_logo` varchar(255) NOT NULL,
  `site_tnc` text NOT NULL,
  `site_privancy` text NOT NULL,
  `site_copyrights` varchar(255) NOT NULL,
  `disciples` longtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `sitesetting`
--

INSERT INTO `sitesetting` (`site_id`, `site_name`, `site_logo`, `site_tnc`, `site_privancy`, `site_copyrights`, `disciples`) VALUES
(1, 'Academic App', '78811_logslitle.jpg', 'user manual', 'Teeet gh fjgj gjgj fhsdgh akaf akjf', 'Dlamini Melusi Mcolisi', '<p>Welcome to the Little School Academic App</p>');

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

--
-- Table structure for table `subjects`
--

CREATE TABLE `subjects` (
  `subid` int(100) NOT NULL,
  `subname` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `subjects`
--

INSERT INTO `subjects` (`subid`, `subname`) VALUES
(1, 'English Language'),
(2, 'Siswati'),
(3, 'Maths'),
(4, 'Science'),
(5, 'ICT');

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

--
-- Table structure for table `teacherpreps`
--

CREATE TABLE `teacherpreps` (
  `prepid` int(11) NOT NULL,
  `teacherid` int(11) NOT NULL,
  `classid` int(11) NOT NULL,
  `datesubmitted` timestamp NOT NULL DEFAULT current_timestamp(),
  `title` varchar(255) NOT NULL,
  `description` longblob NOT NULL,
  `teachercomments` longblob DEFAULT NULL,
  `principalcomments` longblob DEFAULT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `evaluationcomments` longtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `teacherpreps`
--

INSERT INTO `teacherpreps` (`prepid`, `teacherid`, `classid`, `datesubmitted`, `title`, `description`, `teachercomments`, `principalcomments`, `status`, `evaluationcomments`) VALUES
(2, 210345457, 1, '2026-05-04 06:35:04', 'Week 1 Prep', 0x[BLOB], 0x[BLOB], 0x3c703e476f6f6420446179204c656c6f3c2f703e3c703e5468616e6b20796f75204c656c6f2c20707265702069732066696e65206e6f773c2f703e3c703e5468616e6b20796f753c2f703e, 'Approved', '<p>Great&nbsp;</p><p>Im glad learners enjoyed the lessons</p>'),
(3, 210345457, 1, '2026-05-04 08:47:26', 'Lesson prep', 0x[BLOB], 0x3c703e4e6f206c6573736f6e732074616b656e20706c6163652064756520746f20686f6c696461797320616e642073706f7274733c2f703e, 0x3c703e476f6f64206c6573736f6e3c2f703e3c703e5468616e6b20796f753c2f703e, 'Approved', '<p>Noted</p><p>Thank you</p>');

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

--
-- Table structure for table `upload_files`
--

CREATE TABLE `upload_files` (
  `id` int(30) NOT NULL,
  `filename` text NOT NULL,
  `file_path` text NOT NULL,
  `class_id` int(30) NOT NULL,
  `teacher_id` int(30) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  `file_ext` varchar(10) DEFAULT NULL,
  `file_size` int(11) DEFAULT NULL,
  `file_type` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `upload_files`
--

INSERT INTO `upload_files` (`id`, `filename`, `file_path`, `class_id`, `teacher_id`, `date_created`, `file_ext`, `file_size`, `file_type`) VALUES
(1, 'Academic App.pdf', '1777825960_Academic App.pdf', 1, 210345457, '2026-05-03 18:32:40', NULL, NULL, NULL),
(2, 'Final_90_Assignment.docx', '1777829703_Final_90_Assignment.docx', 1, 210345457, '2026-05-03 19:35:03', 'docx', NULL, NULL),
(3, 'videoplayback (1).mp4', '1777829851_videoplayback__1_.mp4', 1, 210345457, '2026-05-03 19:37:31', 'mp4', NULL, NULL);

--
-- Indexes for table `myclasses`
--
ALTER TABLE `myclasses`
  ADD PRIMARY KEY (`classid`);

--
-- Indexes for table `phoneverification`
--
ALTER TABLE `phoneverification`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `regions`
--
ALTER TABLE `regions`
  ADD PRIMARY KEY (`regionid`);

--
-- Indexes for table `sitesetting`
--
ALTER TABLE `sitesetting`
  ADD PRIMARY KEY (`site_id`);

--
-- Indexes for table `subjects`
--
ALTER TABLE `subjects`
  ADD PRIMARY KEY (`subid`);

--
-- Indexes for table `teacherpreps`
--
ALTER TABLE `teacherpreps`
  ADD PRIMARY KEY (`prepid`);

--
-- Indexes for table `upload_files`
--
ALTER TABLE `upload_files`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for table `myclasses`
--
ALTER TABLE `myclasses`
  MODIFY `classid` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `phoneverification`
--
ALTER TABLE `phoneverification`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `regions`
--
ALTER TABLE `regions`
  MODIFY `regionid` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

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

--
-- AUTO_INCREMENT for table `subjects`
--
ALTER TABLE `subjects`
  MODIFY `subid` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `teacherpreps`
--
ALTER TABLE `teacherpreps`
  MODIFY `prepid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `upload_files`
--
ALTER TABLE `upload_files`
  MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

