-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 27, 2023 at 06:13 PM
-- Server version: 5.7.43
-- PHP Version: 8.1.16

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: `jdyoung_schedule`
--

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

--
-- Table structure for table `schedule`
--

CREATE TABLE `schedule` (
  `schedule_id` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `starttime` time DEFAULT NULL,
  `endtime` time DEFAULT NULL,
  `classroom_id` int(11) DEFAULT NULL,
  `class_id` int(11) DEFAULT NULL,
  `type_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `schedule`
--

INSERT INTO `schedule` (`schedule_id`, `date`, `starttime`, `endtime`, `classroom_id`, `class_id`, `type_id`) VALUES
(1, '2023-09-06', NULL, NULL, NULL, NULL, NULL),
(2, '2023-09-07', '10:00:00', '11:50:00', 2, 2, 1),
(3, '2023-09-07', '12:00:00', '13:20:00', 3, 3, 2),
(4, '2023-09-07', '14:00:00', '16:50:00', 4, 4, 2),
(5, '2023-09-08', NULL, NULL, NULL, NULL, NULL),
(6, '2023-09-11', '14:00:00', '15:50:00', 1, 1, 1),
(7, '2023-09-12', '10:00:00', '11:50:00', 2, 2, 1),
(8, '2023-09-12', '12:00:00', '13:20:00', 3, 3, 2),
(9, '2023-09-12', '14:00:00', '16:50:00', 4, 4, 2),
(10, '2023-09-13', NULL, NULL, NULL, NULL, NULL),
(11, '2023-09-14', '10:00:00', '11:50:00', 2, 2, 1),
(12, '2023-09-14', '12:00:00', '13:20:00', 3, 3, 2),
(13, '2023-09-14', '14:00:00', '16:50:00', 4, 4, 2),
(14, '2023-09-15', NULL, NULL, NULL, NULL, NULL),
(15, '2023-09-18', '14:00:00', '15:50:00', 1, 1, 1),
(16, '2023-09-19', '10:00:00', '11:50:00', 2, 2, 1),
(17, '2023-09-19', '14:00:00', '13:20:00', 3, 3, 2),
(18, '2023-09-19', '14:00:00', '16:50:00', 4, 4, 2),
(19, '2023-09-20', NULL, NULL, NULL, NULL, NULL),
(20, '2023-09-21', '10:00:00', '11:50:00', 2, 2, 1),
(21, '2023-09-21', '12:00:00', '13:20:00', 3, 3, 2),
(23, '2023-09-21', '14:00:00', '16:50:00', 4, 4, 2),
(24, '2023-09-22', NULL, NULL, NULL, NULL, NULL),
(25, '2023-09-25', '14:00:00', '15:50:00', 1, 1, 1),
(26, '2023-09-26', '10:00:00', '11:50:00', 2, 2, 1),
(27, '2023-09-26', '12:00:00', '13:20:00', 3, 3, 2),
(28, '2023-09-26', '14:00:00', '16:50:00', 4, 4, 2),
(29, '2023-09-27', NULL, NULL, NULL, NULL, NULL),
(30, '2023-09-28', '10:00:00', '11:50:00', 2, 2, 1),
(31, '2023-09-28', '12:00:00', '13:20:00', 3, 3, 2),
(32, '2023-09-28', '14:00:00', '16:50:00', 4, 4, 2),
(33, '2023-09-29', NULL, NULL, NULL, NULL, NULL),
(34, '2023-10-02', '14:00:00', '15:50:00', 1, 1, 1),
(35, '2023-10-03', '10:00:00', '11:50:00', 2, 2, 1),
(36, '2023-10-03', '12:00:00', '13:20:00', 3, 3, 2),
(37, '2023-10-03', '14:00:00', '16:50:00', 4, 4, 2),
(38, '2023-10-04', NULL, NULL, NULL, NULL, NULL),
(39, '2023-10-05', '10:00:00', '11:50:00', 2, 2, 1),
(40, '2023-10-05', '12:00:00', '13:20:00', 3, 3, 2),
(41, '2023-10-05', '14:00:00', '16:50:00', 4, 4, 2),
(42, '2023-10-06', NULL, NULL, NULL, NULL, NULL),
(43, '2023-10-09', '14:00:00', '15:50:00', 1, 1, 1),
(44, '2023-10-10', '10:00:00', '11:50:00', 2, 2, 1),
(45, '2023-10-10', '12:00:00', '13:20:00', 3, 3, 2),
(46, '2023-10-10', '14:00:00', '16:50:00', 4, 4, 2),
(47, '2023-10-11', NULL, NULL, NULL, NULL, NULL),
(48, '2023-10-12', '10:00:00', '11:50:00', 2, 2, 1),
(49, '2023-10-12', '12:00:00', '13:20:00', 3, 3, 2),
(50, '2023-10-12', '14:00:00', '16:50:00', 4, 4, 2),
(51, '2023-10-13', NULL, NULL, NULL, NULL, NULL),
(52, '2023-10-16', '14:00:00', '15:50:00', 1, 1, 1),
(53, '2023-10-17', '10:00:00', '11:50:00', 2, 2, 1),
(54, '2023-10-17', '12:00:00', '13:20:00', 3, 3, 2),
(55, '2023-10-17', '14:00:00', '16:50:00', 4, 4, 2),
(56, '2023-10-18', NULL, NULL, NULL, NULL, NULL),
(57, '2023-10-19', '10:00:00', '11:50:00', 2, 2, 1),
(58, '2023-10-19', '12:00:00', '13:20:00', 3, 3, 2),
(59, '2023-10-19', '14:00:00', '16:50:00', 4, 4, 2),
(60, '2023-10-20', NULL, NULL, NULL, NULL, NULL),
(61, '2023-10-23', '14:00:00', '15:50:00', 1, 1, 1),
(62, '2023-09-23', '00:00:00', '01:00:00', 4, 6, 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `schedule`
--
ALTER TABLE `schedule`
  ADD PRIMARY KEY (`schedule_id`),
  ADD KEY `classroom_id` (`classroom_id`),
  ADD KEY `class_id` (`class_id`),
  ADD KEY `type_id` (`type_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `schedule`
--
ALTER TABLE `schedule`
  MODIFY `schedule_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=63;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `schedule`
--
ALTER TABLE `schedule`
  ADD CONSTRAINT `schedule_ibfk_1` FOREIGN KEY (`classroom_id`) REFERENCES `classrooms` (`classroom_id`),
  ADD CONSTRAINT `schedule_ibfk_2` FOREIGN KEY (`class_id`) REFERENCES `class` (`class_id`),
  ADD CONSTRAINT `schedule_ibfk_3` FOREIGN KEY (`type_id`) REFERENCES `type` (`type_id`);
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 */;
