/*
SQLyog Enterprise - MySQL GUI v8.12 
MySQL - 5.5.5-10.1.32-MariaDB : Database - antrian_rssa
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

CREATE DATABASE /*!32312 IF NOT EXISTS*/`antrian_rssa` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `antrian_rssa`;

/*Table structure for table `master_klinik` */

DROP TABLE IF EXISTS `master_klinik`;

CREATE TABLE `master_klinik` (
  `mk_id` int(11) NOT NULL AUTO_INCREMENT,
  `mk_nama` varchar(50) DEFAULT NULL,
  `mk_kode` varchar(50) DEFAULT NULL,
  `mk_shift` int(5) DEFAULT NULL,
  `mk_menit` int(5) DEFAULT NULL,
  `mk_quota` int(5) DEFAULT NULL,
  `mk_quota_bangku` int(5) DEFAULT NULL,
  `mk_status_shift` int(5) DEFAULT NULL,
  `mk_aktif` int(5) DEFAULT NULL,
  `mk_jadwal` text,
  `mk_tanggal_sekarang` date DEFAULT NULL,
  `mk_shift_buka` int(5) DEFAULT NULL,
  `mk_auto_shift` int(1) DEFAULT NULL,
  `mk_jam_shift` text,
  PRIMARY KEY (`mk_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

/*Data for the table `master_klinik` */

insert  into `master_klinik`(`mk_id`,`mk_nama`,`mk_kode`,`mk_shift`,`mk_menit`,`mk_quota`,`mk_quota_bangku`,`mk_status_shift`,`mk_aktif`,`mk_jadwal`,`mk_tanggal_sekarang`,`mk_shift_buka`,`mk_auto_shift`,`mk_jam_shift`) values (1,'ANAK','AN',3,0,3,2,2,0,'senin|selasa|rabu|kamis|jumat|','2020-07-17',3,1,'07:00|09:40|12:20|'),(2,'JANTUNG','JT',4,0,2,2,2,0,'senin|selasa|rabu|kamis|jumat|','2020-07-17',4,1,'07:00|09:00|11:00|13:00|'),(4,'KANDUNGAN','OB',5,0,2,2,3,0,'rabu|jumat|','2020-07-17',5,1,'07:00|08:36|10:12|11:48|13:24|'),(5,'DALAM','DL',4,0,5,20,1,0,'senin|selasa|rabu|kamis|jumat|','2020-07-17',4,1,'07:00|09:00|11:00|13:00|'),(6,'THT','TH',3,0,10,10,1,0,'senin|selasa|rabu|kamis|jumat|','2020-07-17',3,1,'07:00|09:40|12:20|');

/*Table structure for table `master_loket` */

DROP TABLE IF EXISTS `master_loket`;

CREATE TABLE `master_loket` (
  `ml_id` int(11) NOT NULL AUTO_INCREMENT,
  `ml_nama` varchar(50) DEFAULT NULL,
  `ml_pelayanan` text,
  `ml_quota_bangku` int(5) DEFAULT NULL,
  PRIMARY KEY (`ml_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

/*Data for the table `master_loket` */

insert  into `master_loket`(`ml_id`,`ml_nama`,`ml_pelayanan`,`ml_quota_bangku`) values (1,'Loket 1','2,',12),(4,'Loket 2','1,2,4,',30),(5,'Loket SA','1,2,4,5,',50);

/*Table structure for table `master_menu` */

DROP TABLE IF EXISTS `master_menu`;

CREATE TABLE `master_menu` (
  `mm_id` int(11) NOT NULL AUTO_INCREMENT,
  `mm_nama` varchar(50) DEFAULT NULL,
  `mm_link` varchar(50) DEFAULT NULL,
  `mm_icon` varchar(50) DEFAULT NULL,
  `mm_parent` int(5) DEFAULT NULL,
  `mm_level` int(5) DEFAULT NULL,
  `mm_action` varchar(15) DEFAULT NULL,
  PRIMARY KEY (`mm_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;

/*Data for the table `master_menu` */

insert  into `master_menu`(`mm_id`,`mm_nama`,`mm_link`,`mm_icon`,`mm_parent`,`mm_level`,`mm_action`) values (1,'Dashboard',NULL,'fa fa-dashboard',NULL,1,NULL),(2,'Setting','#','fa fa-gears',NULL,1,NULL),(3,'Hak Akses','ps_hakakses',NULL,2,2,'true'),(4,'User Login','ps_userlogin',NULL,2,2,'true'),(5,'Master Loket','ps_loket',NULL,2,2,'true'),(6,'Master Klinik','ps_klinik',NULL,2,2,'true'),(7,'Anjungan','ps_anjungan','fa fa-desktop',NULL,1,NULL),(8,'Loket Admin','ps_loket_admin','fa fa-pencil-square-o',NULL,1,NULL),(9,'Klinik Admin','ps_klinik_admin','fa fa-ambulance',NULL,1,NULL);

/*Table structure for table `master_tipeuser` */

DROP TABLE IF EXISTS `master_tipeuser`;

CREATE TABLE `master_tipeuser` (
  `mt_id` int(11) NOT NULL AUTO_INCREMENT,
  `mt_nama` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`mt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

/*Data for the table `master_tipeuser` */

insert  into `master_tipeuser`(`mt_id`,`mt_nama`) values (1,'Super Admin'),(2,'Admin'),(3,'Loket'),(4,'Klinik');

/*Table structure for table `master_user` */

DROP TABLE IF EXISTS `master_user`;

CREATE TABLE `master_user` (
  `mu_id` int(11) NOT NULL AUTO_INCREMENT,
  `mu_nama_lengkap` varchar(50) DEFAULT NULL,
  `mu_nama_user` varchar(50) DEFAULT NULL,
  `mu_password` varchar(50) DEFAULT NULL,
  `mu_klinik_id` int(11) DEFAULT NULL,
  `mu_loket_id` int(11) DEFAULT NULL,
  `mu_tipeuser_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`mu_id`),
  KEY `user_tipeuser_FK` (`mu_tipeuser_id`),
  KEY `user_kunjunganklinik_FK` (`mu_klinik_id`),
  KEY `user_loket_FK` (`mu_loket_id`),
  CONSTRAINT `user_kunjunganklinik_FK` FOREIGN KEY (`mu_klinik_id`) REFERENCES `master_klinik` (`mk_id`) ON DELETE SET NULL ON UPDATE SET NULL,
  CONSTRAINT `user_loket_FK` FOREIGN KEY (`mu_loket_id`) REFERENCES `master_loket` (`ml_id`) ON DELETE SET NULL ON UPDATE SET NULL,
  CONSTRAINT `user_tipeuser_FK` FOREIGN KEY (`mu_tipeuser_id`) REFERENCES `master_tipeuser` (`mt_id`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;

/*Data for the table `master_user` */

insert  into `master_user`(`mu_id`,`mu_nama_lengkap`,`mu_nama_user`,`mu_password`,`mu_klinik_id`,`mu_loket_id`,`mu_tipeuser_id`) values (1,'Ragil Bayu Nugroho','hamigaki','afa7f6fb4dd3bb49e6960b6f4c74ce3d',NULL,5,1),(4,'PC 1 loket 2','loket','c866829cdc8d4b47eb94bd97641475fb',NULL,4,3),(5,'Klinik Anak','anak','b7a1bef48e489643e1899eb7f7884b9b',1,NULL,4),(6,'Jantung','jantung','9f2820d31f7b3f13e9f1ebda5af0ad50',2,NULL,4),(7,'Telinga Hidung Tenggorokan','tht','5549219ed402706bc6972e8bc830bdef',6,NULL,4);

/*Table structure for table `master_user_menu` */

DROP TABLE IF EXISTS `master_user_menu`;

CREATE TABLE `master_user_menu` (
  `mum_id` int(11) NOT NULL AUTO_INCREMENT,
  `mum_tambah` varchar(10) DEFAULT NULL,
  `mum_ubah` varchar(10) DEFAULT NULL,
  `mum_hapus` varchar(10) DEFAULT NULL,
  `mum_lihat` varchar(10) DEFAULT NULL,
  `mum_tipeuser_id` int(11) DEFAULT NULL,
  `mum_menu_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`mum_id`),
  KEY `usermenu_tipeuser_FK` (`mum_tipeuser_id`),
  KEY `usermenu_menu_FK` (`mum_menu_id`),
  CONSTRAINT `usermenu_menu_FK` FOREIGN KEY (`mum_menu_id`) REFERENCES `master_menu` (`mm_id`) ON DELETE SET NULL ON UPDATE SET NULL,
  CONSTRAINT `usermenu_tipeuser_FK` FOREIGN KEY (`mum_tipeuser_id`) REFERENCES `master_tipeuser` (`mt_id`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4;

/*Data for the table `master_user_menu` */

insert  into `master_user_menu`(`mum_id`,`mum_tambah`,`mum_ubah`,`mum_hapus`,`mum_lihat`,`mum_tipeuser_id`,`mum_menu_id`) values (9,NULL,NULL,NULL,NULL,2,1),(10,NULL,NULL,NULL,NULL,2,2),(11,NULL,NULL,NULL,NULL,2,3),(12,NULL,NULL,NULL,NULL,2,4),(26,NULL,NULL,NULL,NULL,1,1),(27,NULL,NULL,NULL,NULL,1,2),(28,'tambah','ubah','hapus','lihat',1,3),(29,'tambah','ubah','hapus','lihat',1,4),(30,'tambah','ubah','hapus','lihat',1,5),(31,'tambah','ubah','hapus','lihat',1,6),(32,NULL,NULL,NULL,'lihat',1,7),(33,NULL,NULL,NULL,'lihat',1,8),(34,NULL,NULL,NULL,'lihat',1,9),(35,NULL,NULL,NULL,NULL,3,1),(36,NULL,NULL,NULL,NULL,3,2),(37,NULL,NULL,NULL,'lihat',3,5),(38,NULL,NULL,NULL,'lihat',3,8),(39,NULL,NULL,NULL,NULL,4,1),(40,NULL,NULL,NULL,NULL,4,2),(41,NULL,NULL,NULL,'lihat',4,6),(42,NULL,NULL,NULL,'lihat',4,9);

/*Table structure for table `proses_kunjung_klinik` */

DROP TABLE IF EXISTS `proses_kunjung_klinik`;

CREATE TABLE `proses_kunjung_klinik` (
  `pkk_id` int(11) NOT NULL AUTO_INCREMENT,
  `pkk_tanggal_datang` datetime DEFAULT NULL,
  `pkk_tanggal_selesai` datetime DEFAULT NULL,
  `pkk_klinik_id` int(11) DEFAULT NULL,
  `pkk_pengunjung_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`pkk_id`),
  KEY `kunjunganklinik_pengunjung_FK` (`pkk_klinik_id`),
  KEY `kunjunganklinik_pengunjung` (`pkk_pengunjung_id`),
  CONSTRAINT `kunjunganklinik_klinik_FK` FOREIGN KEY (`pkk_klinik_id`) REFERENCES `master_klinik` (`mk_id`) ON DELETE SET NULL ON UPDATE SET NULL,
  CONSTRAINT `kunjunganklinik_pengunjung` FOREIGN KEY (`pkk_pengunjung_id`) REFERENCES `proses_pengunjung` (`pp_id`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

/*Data for the table `proses_kunjung_klinik` */

insert  into `proses_kunjung_klinik`(`pkk_id`,`pkk_tanggal_datang`,`pkk_tanggal_selesai`,`pkk_klinik_id`,`pkk_pengunjung_id`) values (1,'2020-07-10 01:34:23',NULL,1,134),(2,'2020-07-10 01:34:30',NULL,2,140),(3,'2020-07-10 01:34:31',NULL,2,141);

/*Table structure for table `proses_kunjung_loket` */

DROP TABLE IF EXISTS `proses_kunjung_loket`;

CREATE TABLE `proses_kunjung_loket` (
  `pkl_id` int(11) NOT NULL AUTO_INCREMENT,
  `pkl_tanggal_datang` datetime DEFAULT NULL,
  `pkl_tanggal_selesai` datetime DEFAULT NULL,
  `pkl_loket_id` int(11) DEFAULT NULL,
  `pkl_pengunjung_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`pkl_id`),
  KEY `kunjunganloket_loket_FK` (`pkl_loket_id`),
  KEY `kunjunganloket_pengunjung_FK` (`pkl_pengunjung_id`),
  CONSTRAINT `kunjunganloket_loket_FK` FOREIGN KEY (`pkl_loket_id`) REFERENCES `master_loket` (`ml_id`) ON DELETE SET NULL ON UPDATE SET NULL,
  CONSTRAINT `kunjunganloket_pengunjung_FK` FOREIGN KEY (`pkl_pengunjung_id`) REFERENCES `proses_pengunjung` (`pp_id`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Data for the table `proses_kunjung_loket` */

/*Table structure for table `proses_pengunjung` */

DROP TABLE IF EXISTS `proses_pengunjung`;

CREATE TABLE `proses_pengunjung` (
  `pp_id` int(11) NOT NULL AUTO_INCREMENT,
  `pp_nomor_antrian` varchar(10) DEFAULT NULL,
  `pp_shift` int(5) DEFAULT NULL,
  `pp_tanggal_periksa` date DEFAULT NULL,
  `pp_tanggal_datang` datetime DEFAULT NULL,
  `pp_posisi_status` int(5) DEFAULT NULL,
  `pp_pendaftaran_online` varchar(10) DEFAULT NULL,
  `pp_rekamedik` varchar(10) DEFAULT NULL,
  `pp_status` int(5) DEFAULT NULL,
  `pp_aktif` int(5) DEFAULT NULL,
  `pp_klinik_id` int(11) DEFAULT NULL,
  `pp_barcode` varchar(15) DEFAULT NULL,
  `pp_nomor_antrian_klinik` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`pp_id`),
  KEY `pengunjung_klinik_FK` (`pp_klinik_id`),
  CONSTRAINT `pengunjung_klinik_FK` FOREIGN KEY (`pp_klinik_id`) REFERENCES `master_klinik` (`mk_id`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=188 DEFAULT CHARSET=utf8mb4;

/*Data for the table `proses_pengunjung` */

insert  into `proses_pengunjung`(`pp_id`,`pp_nomor_antrian`,`pp_shift`,`pp_tanggal_periksa`,`pp_tanggal_datang`,`pp_posisi_status`,`pp_pendaftaran_online`,`pp_rekamedik`,`pp_status`,`pp_aktif`,`pp_klinik_id`,`pp_barcode`,`pp_nomor_antrian_klinik`) values (4,'AN1001',1,'2020-06-27','2020-06-25 11:33:16',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(5,'AN1002',1,'2020-06-27','2020-06-25 11:34:00',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(6,'JT1001',1,'2020-06-26','2020-06-25 01:06:31',1,NULL,NULL,NULL,NULL,2,NULL,NULL),(7,'OB2001',2,'2020-06-26','2020-06-25 01:13:35',1,'002121','11003532',NULL,NULL,4,NULL,NULL),(9,'AN1003',1,'2020-06-27','2020-06-26 09:20:06',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(14,'AN2004',2,'2020-06-27','2020-06-26 09:22:23',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(15,'AN2005',2,'2020-06-27','2020-06-26 09:22:25',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(19,'AN2006',2,'2020-06-27','2020-06-26 09:28:44',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(20,'AN3007',3,'2020-06-27','2020-06-26 09:28:49',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(21,'AN3008',3,'2020-06-27','2020-06-26 09:28:51',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(23,'JT2001',2,'2020-06-27','2020-06-27 10:25:29',1,NULL,NULL,NULL,NULL,2,NULL,NULL),(24,'AN3009',3,'2020-06-27','2020-06-27 12:00:21',2,NULL,NULL,NULL,NULL,1,NULL,NULL),(25,'AN1001',1,'2020-06-29','2020-06-27 04:39:03',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(26,'AN3002',3,'2020-06-29','2020-06-29 08:55:32',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(27,'AN2003',2,'2020-06-29','2020-06-29 10:02:12',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(28,'AN1004',1,'2020-06-29','2020-06-29 10:02:17',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(29,'AN1005',1,'2020-06-29','2020-06-29 10:02:20',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(30,'AN2006',2,'2020-06-29','2020-06-29 10:09:48',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(31,'AN2007',2,'2020-06-29','2020-06-29 10:10:13',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(32,'AN3008',3,'2020-06-29','2020-06-29 10:11:27',1,NULL,NULL,NULL,NULL,1,NULL,NULL),(35,'JT1001',1,'2020-06-29','2020-06-29 10:43:35',1,NULL,NULL,NULL,NULL,2,NULL,NULL),(41,'DL1001',1,'2020-06-29','2020-06-29 10:49:25',1,NULL,NULL,NULL,NULL,5,NULL,NULL),(42,'DL2002',2,'2020-06-29','2020-06-29 10:49:44',1,NULL,NULL,NULL,NULL,5,NULL,NULL),(43,'DL1003',1,'2020-06-29','2020-06-29 10:50:21',1,NULL,NULL,NULL,NULL,5,NULL,NULL),(44,'DL1004',1,'2020-06-29','2020-06-29 10:50:29',1,NULL,NULL,NULL,NULL,5,NULL,NULL),(45,'DL1005',1,'2020-06-29','2020-06-29 10:50:42',1,NULL,NULL,NULL,NULL,5,NULL,NULL),(46,'DL1006',1,'2020-06-29','2020-06-29 10:50:47',1,NULL,NULL,NULL,NULL,5,NULL,NULL),(52,'AN3009',3,'2020-06-29','2020-06-29 02:28:14',1,NULL,NULL,NULL,NULL,1,'200629301009',NULL),(53,'AN1001',1,'2020-07-02','2020-07-02 07:45:51',1,NULL,NULL,1,NULL,1,'200702101001',NULL),(54,'AN1002',1,'2020-07-02','2020-07-02 07:45:53',1,NULL,NULL,1,NULL,1,'200702101002',NULL),(55,'AN1003',1,'2020-07-02','2020-07-02 07:45:55',1,NULL,NULL,1,NULL,1,'200702101003',NULL),(56,'AN2004',2,'2020-07-02','2020-07-02 10:02:07',1,NULL,NULL,1,NULL,1,'200702201004',NULL),(57,'DL1001',1,'2020-07-02','2020-07-02 11:57:51',1,NULL,NULL,NULL,NULL,5,'200702105001',NULL),(58,'JT1001',1,'2020-07-02','2020-07-02 11:57:54',1,NULL,NULL,1,NULL,2,'200702102001',NULL),(59,'AN1001',1,'2020-07-03','2020-07-03 05:22:51',1,NULL,NULL,1,NULL,1,'200703100001',NULL),(60,'AN1002',1,'2020-07-03','2020-07-03 05:22:54',1,NULL,NULL,1,NULL,1,'200703100002',NULL),(61,'OB1001',1,'2020-07-03','2020-07-03 05:22:56',1,NULL,NULL,1,NULL,4,'200703100003',NULL),(64,'OB1002',1,'2020-07-03','2020-07-03 05:24:36',1,NULL,NULL,1,NULL,4,'200703100004',NULL),(89,'AN1001',1,'2020-07-05','2020-07-05 05:55:31',1,NULL,NULL,NULL,NULL,1,'200705100001',NULL),(90,'AN1002',1,'2020-07-05','2020-07-05 05:55:32',1,NULL,NULL,NULL,NULL,1,'200705100002',NULL),(91,'AN1003',1,'2020-07-05','2020-07-05 05:55:34',1,NULL,NULL,NULL,NULL,1,'200705100003',NULL),(92,'OB1001',1,'2020-07-05','2020-07-05 05:55:37',1,NULL,NULL,NULL,NULL,4,'200705100004',NULL),(93,'AN2004',2,'2020-07-05','2020-07-05 05:55:39',1,NULL,NULL,NULL,NULL,1,'200705200005',NULL),(94,'AN2005',2,'2020-07-05','2020-07-05 05:55:41',1,NULL,NULL,NULL,NULL,1,'200705200006',NULL),(95,'OB1002',1,'2020-07-05','2020-07-05 05:55:43',1,NULL,NULL,NULL,NULL,4,'200705100007',NULL),(96,'OB2003',2,'2020-07-05','2020-07-05 05:55:45',1,NULL,NULL,NULL,NULL,4,'200705200008',NULL),(97,'AN1001',1,'2020-07-06','2020-07-06 08:48:12',1,NULL,NULL,1,NULL,1,'200706100001',NULL),(98,'AN1002',1,'2020-07-06','2020-07-06 08:48:14',1,NULL,NULL,1,NULL,1,'200706100002',NULL),(99,'AN1003',1,'2020-07-06','2020-07-06 08:48:15',1,NULL,NULL,1,NULL,1,'200706100003',NULL),(100,'AN2004',2,'2020-07-06','2020-07-06 08:48:17',1,NULL,NULL,1,NULL,1,'200706200004',NULL),(101,'DL1001',1,'2020-07-06','2020-07-06 08:48:20',1,NULL,NULL,NULL,NULL,5,'200706100005',NULL),(102,'JT1001',1,'2020-07-06','2020-07-06 08:48:22',1,NULL,NULL,1,NULL,2,'200706100006',NULL),(103,'DL1002',1,'2020-07-06','2020-07-06 08:48:23',1,NULL,NULL,NULL,NULL,5,'200706100007',NULL),(104,'DL1003',1,'2020-07-06','2020-07-06 08:48:25',1,NULL,NULL,NULL,NULL,5,'200706100008',NULL),(105,'JT1002',1,'2020-07-06','2020-07-06 08:48:28',1,NULL,NULL,1,NULL,2,'200706100009',NULL),(106,'JT2003',2,'2020-07-06','2020-07-06 08:48:31',1,NULL,NULL,1,NULL,2,'200706200010',NULL),(107,'AN2005',2,'2020-07-06','2020-07-06 11:32:21',1,NULL,NULL,1,NULL,1,'200706200011',NULL),(108,'AN2006',2,'2020-07-06','2020-07-06 11:32:23',1,NULL,NULL,1,NULL,1,'200706200012',NULL),(109,'JT2004',2,'2020-07-06','2020-07-06 11:32:27',1,NULL,NULL,1,NULL,2,'200706200013',NULL),(110,'JT3005',3,'2020-07-06','2020-07-06 11:32:28',1,NULL,NULL,NULL,NULL,2,'200706300014',NULL),(111,'AN3007',3,'2020-07-06','2020-07-06 12:34:01',1,NULL,NULL,NULL,NULL,1,'200706300015',NULL),(112,'AN3008',3,'2020-07-06','2020-07-06 12:34:03',1,NULL,NULL,NULL,NULL,1,'200706300016',NULL),(113,'AN3009',3,'2020-07-06','2020-07-06 12:39:10',1,NULL,NULL,NULL,NULL,1,'200706300017',NULL),(114,'JT3006',3,'2020-07-06','2020-07-06 12:39:35',1,NULL,NULL,NULL,NULL,2,'200706300018',NULL),(115,'AN1001',1,'2020-07-08','2020-07-08 08:08:29',1,NULL,NULL,1,NULL,1,'200708100001',NULL),(116,'DL1001',1,'2020-07-08','2020-07-08 08:08:32',1,NULL,NULL,NULL,NULL,5,'200708100002',NULL),(117,'JT1001',1,'2020-07-08','2020-07-08 08:08:34',1,NULL,NULL,1,NULL,2,'200708100003',NULL),(118,'OB1001',1,'2020-07-08','2020-07-08 08:08:36',1,NULL,NULL,1,NULL,4,'200708100004',NULL),(119,'AN1002',1,'2020-07-08','2020-07-08 08:08:38',1,NULL,NULL,1,NULL,1,'200708100005',NULL),(120,'DL1002',1,'2020-07-08','2020-07-08 08:08:40',1,NULL,NULL,NULL,NULL,5,'200708100006',NULL),(121,'AN1003',1,'2020-07-08','2020-07-08 08:08:42',1,NULL,NULL,1,NULL,1,'200708100007',NULL),(122,'AN2004',2,'2020-07-08','2020-07-08 08:08:43',1,NULL,NULL,1,NULL,1,'200708200008',NULL),(123,'AN2005',2,'2020-07-08','2020-07-08 08:19:18',1,NULL,NULL,NULL,NULL,1,'200708200009',NULL),(124,'AN2006',2,'2020-07-08','2020-07-08 08:20:01',1,NULL,NULL,NULL,NULL,1,'200708200010',NULL),(125,'AN3007',3,'2020-07-08','2020-07-08 09:19:07',1,NULL,NULL,NULL,NULL,1,'200708300011',NULL),(126,'AN3008',3,'2020-07-08','2020-07-08 09:19:09',1,NULL,NULL,NULL,NULL,1,'200708300012',NULL),(127,'DL1003',1,'2020-07-08','2020-07-08 09:19:12',1,NULL,NULL,NULL,NULL,5,'200708100013',NULL),(128,'JT1002',1,'2020-07-08','2020-07-08 09:19:15',1,NULL,NULL,NULL,NULL,2,'200708100014',NULL),(129,'OB1002',1,'2020-07-08','2020-07-08 09:19:17',1,NULL,NULL,NULL,NULL,4,'200708100015',NULL),(130,'AN3009',3,'2020-07-08','2020-07-08 09:50:15',1,NULL,NULL,NULL,NULL,1,'200708300016',NULL),(131,'DL1004',1,'2020-07-08','2020-07-08 09:50:19',1,NULL,NULL,NULL,NULL,5,'200708100017',NULL),(132,'DL1005',1,'2020-07-08','2020-07-08 09:50:21',1,NULL,NULL,NULL,NULL,5,'200708100018',NULL),(133,'AN1001',1,'2020-07-10','2020-07-10 08:46:17',1,NULL,NULL,1,NULL,1,'200710100001',NULL),(134,'AN1002',1,'2020-07-10','2020-07-10 08:46:19',1,NULL,NULL,1,NULL,1,'200710100002',NULL),(135,'AN1003',1,'2020-07-10','2020-07-10 08:46:21',1,NULL,NULL,1,NULL,1,'200710100003',NULL),(136,'DL1001',1,'2020-07-10','2020-07-10 08:46:23',1,NULL,NULL,NULL,NULL,5,'200710100004',NULL),(137,'DL1002',1,'2020-07-10','2020-07-10 08:46:25',1,NULL,NULL,NULL,NULL,5,'200710100005',NULL),(138,'DL1003',1,'2020-07-10','2020-07-10 08:46:27',1,NULL,NULL,NULL,NULL,5,'200710100006',NULL),(139,'DL1004',1,'2020-07-10','2020-07-10 08:46:30',1,NULL,NULL,NULL,NULL,5,'200710100007',NULL),(140,'JT1001',1,'2020-07-10','2020-07-10 08:46:32',1,NULL,NULL,1,NULL,2,'200710100008',NULL),(141,'JT1002',1,'2020-07-10','2020-07-10 08:46:34',1,NULL,NULL,1,NULL,2,'200710100009',NULL),(142,'OB1001',1,'2020-07-10','2020-07-10 08:46:37',1,NULL,NULL,1,NULL,4,'200710100010',NULL),(143,'OB1002',1,'2020-07-10','2020-07-10 08:46:38',1,NULL,NULL,1,NULL,4,'200710100011',NULL),(144,'AN2004',2,'2020-07-10','2020-07-10 09:50:23',1,NULL,NULL,1,NULL,1,'200710200012',NULL),(145,'AN2005',2,'2020-07-10','2020-07-10 09:50:25',1,NULL,NULL,1,NULL,1,'200710200013',NULL),(146,'DL1005',1,'2020-07-10','2020-07-10 09:50:27',1,NULL,NULL,NULL,NULL,5,'200710100014',NULL),(147,'OB2003',2,'2020-07-10','2020-07-10 09:50:31',1,NULL,NULL,1,NULL,4,'200710200015',NULL),(148,'JT2003',2,'2020-07-10','2020-07-10 09:50:32',1,NULL,NULL,1,NULL,2,'200710200016',NULL),(149,'AN1001',1,'2020-07-14','2020-07-14 07:48:17',1,NULL,NULL,1,NULL,1,'200714100001',NULL),(150,'AN1002',1,'2020-07-14','2020-07-14 07:48:28',1,'1231354','11232355',1,NULL,1,'200714100002',NULL),(151,'AN1003',1,'2020-07-14','2020-07-14 07:49:39',1,NULL,NULL,1,NULL,1,'200714100003',NULL),(152,'AN2004',2,'2020-07-14','2020-07-14 07:49:53',1,NULL,NULL,NULL,NULL,1,'200714200004',NULL),(153,'AN2005',2,'2020-07-14','2020-07-14 07:50:05',1,NULL,NULL,NULL,NULL,1,'200714200005',NULL),(154,'AN2006',2,'2020-07-14','2020-07-14 07:50:22',1,NULL,NULL,NULL,NULL,1,'200714200006',NULL),(155,'AN3007',3,'2020-07-14','2020-07-14 07:51:34',1,NULL,NULL,NULL,NULL,1,'200714300007',NULL),(156,'JT1001',1,'2020-07-14','2020-07-14 07:51:39',1,NULL,NULL,1,NULL,2,'200714100008',NULL),(157,'JT1002',1,'2020-07-14','2020-07-14 07:51:40',1,NULL,NULL,1,NULL,2,'200714100009',NULL),(158,'AN3008',3,'2020-07-14','2020-07-14 07:52:53',1,NULL,NULL,NULL,NULL,1,'200714300010',NULL),(159,'AN3009',3,'2020-07-14','2020-07-14 07:52:55',1,NULL,NULL,NULL,NULL,1,'200714300011',NULL),(160,'AN1001',1,'2020-07-16','2020-07-16 09:11:56',1,NULL,NULL,1,NULL,1,'200716100001',NULL),(161,'AN2002',2,'2020-07-16','2020-07-16 09:12:05',1,NULL,NULL,NULL,NULL,1,'200716200002',NULL),(162,'AN1003',1,'2020-07-16','2020-07-16 09:12:07',1,NULL,NULL,1,NULL,1,'200716100003',NULL),(163,'AN1004',1,'2020-07-16','2020-07-16 09:12:27',1,'213213213','11021223',1,NULL,1,'200716100004',NULL),(164,'AN2005',2,'2020-07-16','2020-07-16 09:16:07',1,NULL,NULL,NULL,NULL,1,'200716200005',NULL),(165,'AN2006',2,'2020-07-16','2020-07-16 09:16:13',1,NULL,NULL,NULL,NULL,1,'200716200006',NULL),(166,'DL1001',1,'2020-07-16','2020-07-16 11:41:14',1,NULL,NULL,NULL,NULL,5,'200716100007',NULL),(167,'JT1001',1,'2020-07-16','2020-07-16 11:41:16',1,NULL,'1122334455',1,NULL,2,'200716100008','KLJT001'),(168,'JT1002',1,'2020-07-16','2020-07-16 11:41:26',1,NULL,'21231515',1,NULL,2,'200716100009','KLJT002'),(169,'AN3007',3,'2020-07-16','2020-07-16 11:41:28',1,NULL,NULL,NULL,NULL,1,'200716300010',NULL),(170,'AN3008',3,'2020-07-16','2020-07-16 11:41:30',1,NULL,NULL,NULL,NULL,1,'200716300011',NULL),(171,'AN3009',3,'2020-07-16','2020-07-16 11:41:32',1,NULL,NULL,NULL,NULL,1,'200716300012',NULL),(172,'JT2003',2,'2020-07-16','2020-07-16 11:41:35',1,NULL,'3215646',1,NULL,2,'200716200013','KLJT003'),(173,'JT2004',2,'2020-07-16','2020-07-16 11:41:37',1,NULL,'1020',1,NULL,2,'200716200014','KLJT004'),(174,'JT3005',3,'2020-07-16','2020-07-16 01:35:47',1,NULL,NULL,NULL,NULL,2,'200716300015',NULL),(175,'AN1001',1,'2020-07-17','2020-07-17 08:30:22',1,NULL,'11223344',1,NULL,1,'200717100001','KLAN001'),(176,'DL1001',1,'2020-07-17','2020-07-17 08:30:26',1,NULL,NULL,NULL,NULL,5,'200717100002',NULL),(177,'JT1001',1,'2020-07-17','2020-07-17 08:30:28',1,NULL,'808080',1,NULL,2,'200717100003','KLJT001'),(178,'OB1001',1,'2020-07-17','2020-07-17 08:30:30',1,NULL,NULL,1,NULL,4,'200717100004',NULL),(179,'TH1001',1,'2020-07-17','2020-07-17 08:30:31',1,NULL,NULL,NULL,NULL,6,'200717100005',NULL),(180,'AN1002',1,'2020-07-17','2020-07-17 08:30:33',1,NULL,NULL,1,NULL,1,'200717100006',NULL),(181,'JT1002',1,'2020-07-17','2020-07-17 08:30:35',1,NULL,NULL,1,NULL,2,'200717100007',NULL),(182,'OB1002',1,'2020-07-17','2020-07-17 08:30:37',1,NULL,NULL,1,NULL,4,'200717100008',NULL),(183,'AN1003',1,'2020-07-17','2020-07-17 08:30:39',1,NULL,NULL,1,NULL,1,'200717100009',NULL),(184,'AN2004',2,'2020-07-17','2020-07-17 08:30:41',1,NULL,NULL,NULL,NULL,1,'200717200010',NULL),(185,'OB2003',2,'2020-07-17','2020-07-17 08:30:43',1,NULL,NULL,NULL,NULL,4,'200717200011',NULL),(186,'OB2004',2,'2020-07-17','2020-07-17 08:30:45',1,NULL,NULL,NULL,NULL,4,'200717200012',NULL),(187,'OB3005',3,'2020-07-17','2020-07-17 08:30:47',1,NULL,NULL,NULL,NULL,4,'200717300013',NULL);

/*Table structure for table `proses_ruang_tunggu` */

DROP TABLE IF EXISTS `proses_ruang_tunggu`;

CREATE TABLE `proses_ruang_tunggu` (
  `prt_id` int(11) NOT NULL AUTO_INCREMENT,
  `prt_status` int(5) DEFAULT NULL,
  `prt_tanggal` datetime DEFAULT NULL,
  `prt_aktif` int(5) DEFAULT NULL,
  `prt_pengunjung_id` int(5) DEFAULT NULL,
  PRIMARY KEY (`prt_id`),
  KEY `ruangtunggu_pengunjung_FK` (`prt_pengunjung_id`),
  CONSTRAINT `ruangtunggu_pengunjung_FK` FOREIGN KEY (`prt_pengunjung_id`) REFERENCES `proses_pengunjung` (`pp_id`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4;

/*Data for the table `proses_ruang_tunggu` */

insert  into `proses_ruang_tunggu`(`prt_id`,`prt_status`,`prt_tanggal`,`prt_aktif`,`prt_pengunjung_id`) values (1,0,'2020-07-08 11:26:04',1,115),(2,0,'2020-07-08 11:26:04',0,117),(3,0,'2020-07-08 11:26:04',0,118),(4,0,'2020-07-08 11:26:05',0,119),(5,0,'2020-07-08 11:26:05',0,121),(6,0,'2020-07-08 11:27:50',0,122),(7,4,'2020-07-10 08:49:51',0,133),(8,4,'2020-07-10 08:49:51',0,134),(9,0,'2020-07-10 08:49:51',0,135),(10,4,'2020-07-10 08:49:51',0,140),(11,4,'2020-07-10 08:49:51',0,141),(12,0,'2020-07-10 11:00:13',0,142),(13,0,'2020-07-10 11:00:13',0,143),(14,4,'2020-07-10 11:00:13',0,144),(15,0,'2020-07-10 11:04:47',0,145),(16,0,'2020-07-10 11:04:47',0,147),(17,0,'2020-07-10 11:04:47',0,148),(18,5,'2020-07-14 08:04:23',0,149),(19,4,'2020-07-14 08:04:23',0,150),(20,5,'2020-07-14 08:04:23',0,151),(21,5,'2020-07-14 08:04:23',0,156),(22,5,'2020-07-14 08:04:23',0,157),(23,5,'2020-07-16 09:18:50',0,160),(24,5,'2020-07-16 09:18:50',0,162),(25,1,'2020-07-16 09:18:50',0,163),(26,5,'2020-07-16 11:46:51',0,167),(27,5,'2020-07-16 11:46:51',0,168),(28,5,'2020-07-16 01:36:16',0,172),(29,5,'2020-07-16 01:36:16',0,173),(30,6,'2020-07-17 08:32:03',0,175),(31,4,'2020-07-17 08:32:03',0,177),(32,1,'2020-07-17 08:32:03',0,178),(33,1,'2020-07-17 08:32:03',0,180),(34,1,'2020-07-17 08:32:03',0,181),(35,1,'2020-07-17 11:00:30',0,182),(36,1,'2020-07-17 11:00:30',0,183);

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
