Ovako izgleda sql za moju bazu.
Zatim doctors_list i patient_list, a doctors_schedule je radno vreme doktora (8 sati, prepodne ili popodne)
Code:-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 29, 2021 at 05:00 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET GLOBAL time_zone = "+02:00";
--
-- Database: `doctordb`
--
-- --------------------------------------------------------
--
-- Table structure for table `appointment_list`
--
CREATE TABLE `appointment_list` (
`id` int(30) NOT NULL,
`doctor_id` int(30) NOT NULL,
`patient_id` int(30) NOT NULL,
`schedule` datetime NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0= for verification, 1=confirmed,2= reschedule,3=done',
`date_created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `appointment_list`
--
INSERT INTO `appointment_list` (`id`, `doctor_id`, `patient_id`, `schedule`, `status`, `date_created`) VALUES
(38, 4, 5, '2021-09-23 17:00:00', 0, '2021-09-22 19:52:02');
-- --------------------------------------------------------
--
-- Table structure for table `doctors_list`
--
CREATE TABLE `doctors_list` (
`id` int(30) NOT NULL,
`name` text NOT NULL,
`name_pref` varchar(100) NOT NULL,
`clinic_address` text NOT NULL,
`contact` text NOT NULL,
`email` text NOT NULL,
`specialty_ids` text NOT NULL,
`img_path` text NOT NULL,
`date_created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `doctors_list`
--
INSERT INTO `doctors_list` (`id`, `name`, `name_pref`, `clinic_address`, `contact`, `email`, `specialty_ids`, `img_path`, `date_created`) VALUES
(4, 'petar petrović', 'doktor medicine', 'petra petrovića 2, 21000 Novi Sad', '+381 222222222', '
[email protected]', '[7]', '1631635740_Screenshot_20210914-175252-399.png', '2021-09-14 17:17:51');
-- --------------------------------------------------------
--
-- Table structure for table `doctors_schedule`
--
CREATE TABLE `doctors_schedule` (
`id` int(30) NOT NULL,
`doctor_id` int(30) NOT NULL,
`day` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci NOT NULL,
`time_from` time NOT NULL,
`time_to` time NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `doctors_schedule`
--
INSERT INTO `doctors_schedule` (`id`, `doctor_id`, `day`, `time_from`, `time_to`) VALUES
(27, 4, 'Ponedeljak', '14:00:00', '20:00:00'),
(28, 4, 'Utorak', '14:00:00', '20:00:00'),
(29, 4, 'Sreda', '14:00:00', '20:00:00'),
(30, 4, 'Četvrtak', '14:00:00', '20:00:00'),
(31, 4, 'Petak', '14:00:00', '20:00:00'),
(32, 5, 'Ponedeljak', '10:00:00', '14:00:00'),
(33, 5, 'Utorak', '10:00:00', '14:00:00'),
(34, 5, 'Sreda', '10:00:00', '14:00:00'),
(35, 5, 'Četvrtak', '10:00:00', '14:00:00'),
(36, 5, 'Petak', '10:00:00', '14:00:00'),
(37, 6, 'Ponedeljak', '10:00:00', '14:00:00'),
(38, 6, 'Utorak', '10:00:00', '14:00:00'),
(39, 6, 'Sreda', '10:00:00', '14:00:00'),
(40, 6, 'Četvrtak', '10:00:00', '14:00:00'),
(41, 6, 'Petak', '10:00:00', '14:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `patient_list`
--
CREATE TABLE `patient_list` (
`id` int(30) NOT NULL,
`name` text NOT NULL,
`contact` varchar(30) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(200) NOT NULL,
`price` varchar (10) NOT NULL,
`type` tinyint(1) NOT NULL DEFAULT 3 COMMENT '3=patient',
`date_created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `patient_list`
--
INSERT INTO `patient_list` (`id`, `name`, `contact`, `email`, `password`, `price`, `type`, `date_created`) VALUES
(5, 'ivana ivić', '0642222222', '
[email protected]', '7f112a7714e70f6efc5d59374f49dde1', 1500, 3, '2021-09-22 19:48:59');
-- --------------------------------------------------------
--
-- Indexes for dumped tables
--
--
-- Indexes for table `appointment_list`
--
ALTER TABLE `appointment_list`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `doctors_list`
--
ALTER TABLE `doctors_list`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `doctors_schedule`
--
ALTER TABLE `doctors_schedule`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `patient_list`
--
ALTER TABLE `patient_list`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `appointment_list`
--
ALTER TABLE `appointment_list`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=41;
--
-- AUTO_INCREMENT for table `doctors_list`
--
ALTER TABLE `doctors_list`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `doctors_schedule`
--
ALTER TABLE `doctors_schedule`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;
--
-- AUTO_INCREMENT for table `patient_list`
--
ALTER TABLE `patient_list`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
COMMIT;