/*
SQLyog Professional v13.1.1 (64 bit)
MySQL - 10.4.24-MariaDB : Database - starter_template_ci
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

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

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`starter_template_ci` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `starter_template_ci`;

/*Table structure for table `auth_assignment` */

DROP TABLE IF EXISTS `auth_assignment`;

CREATE TABLE `auth_assignment` (
  `item_name` varchar(100) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`item_name`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `auth_assignment` */

insert  into `auth_assignment`(`item_name`,`user_id`,`created_at`) values 
('GROUPMENU-rekam-medik',2,1656664501),
('level-1[R]',2,1656664501),
('level-2[R]',2,1656664501),
('profile[R]',2,1656664501),
('setting[R]',2,1656664501),
('sub-menu-1[R]',2,1656664501),
('test-menu[R]',2,1656664501);

/*Table structure for table `auth_item` */

DROP TABLE IF EXISTS `auth_item`;

CREATE TABLE `auth_item` (
  `name` varchar(100) NOT NULL,
  `type` int(11) DEFAULT NULL,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `auth_item` */

insert  into `auth_item`(`name`,`type`,`created_at`,`updated_at`) values 
('company-profile[A]',1,1654825673,1654825673),
('company-profile[C]',1,1654825673,1654825673),
('company-profile[D]',1,1654825673,1654825673),
('company-profile[R]',1,1654825673,1654825673),
('company-profile[U]',1,1654825673,1654825673),
('group-menu[A]',1,1652241728,1652241728),
('group-menu[C]',1,1652241728,1652241728),
('group-menu[D]',1,1652241728,1652241728),
('group-menu[R]',1,1652241728,1652241728),
('group-menu[U]',1,1652241728,1652241728),
('GROUPMENU-pengadministrasian-umum',1,1652408432,1652408432),
('GROUPMENU-rekam-medik',1,1652409682,1652409682),
('level-1[A]',1,1652240464,1652240464),
('level-1[C]',1,1652240464,1652240464),
('level-1[D]',1,1652240464,1652240464),
('level-1[R]',1,1652240464,1652240464),
('level-1[U]',1,1652240464,1652240464),
('level-2[A]',1,1652240479,1652240479),
('level-2[C]',1,1652240479,1652240479),
('level-2[D]',1,1652240479,1652240479),
('level-2[R]',1,1652240479,1652240479),
('level-2[U]',1,1652240479,1652240479),
('menu[A]',1,1652240301,1652240301),
('menu[C]',1,1652240301,1652240301),
('menu[D]',1,1652240301,1652240301),
('menu[R]',1,1652240301,1652240301),
('menu[U]',1,1652240301,1652240301),
('profile[A]',1,1652856415,1652856415),
('profile[C]',1,1652856415,1652856415),
('profile[D]',1,1652856415,1652856415),
('profile[R]',1,1652856415,1652856415),
('profile[U]',1,1652856415,1652856415),
('role[A]',1,1652240318,1652240318),
('role[C]',1,1652240318,1652240318),
('role[D]',1,1652240318,1652240318),
('role[R]',1,1652240318,1652240318),
('role[U]',1,1652240318,1652240318),
('setting[A]',1,1652240250,1652240250),
('setting[C]',1,1652240250,1652240250),
('setting[D]',1,1652240250,1652240250),
('setting[R]',1,1652240250,1652240250),
('setting[U]',1,1652240250,1652240250),
('sub-menu-1[A]',1,1652240402,1652240402),
('sub-menu-1[C]',1,1652240402,1652240402),
('sub-menu-1[D]',1,1652240402,1652240402),
('sub-menu-1[R]',1,1652240402,1652240402),
('sub-menu-1[U]',1,1652240402,1652240402),
('sub-menu-2[A]',1,1652240418,1652240418),
('sub-menu-2[C]',1,1652240418,1652240418),
('sub-menu-2[D]',1,1652240418,1652240418),
('sub-menu-2[R]',1,1652240418,1652240418),
('sub-menu-2[U]',1,1652240418,1652240418),
('test-menu-2[A]',1,1652240450,1652240450),
('test-menu-2[C]',1,1652240450,1652240450),
('test-menu-2[D]',1,1652240450,1652240450),
('test-menu-2[R]',1,1652240450,1652240450),
('test-menu-2[U]',1,1652240450,1652240450),
('test-menu[A]',1,1652240362,1652240362),
('test-menu[C]',1,1652240362,1652240362),
('test-menu[D]',1,1652240362,1652240362),
('test-menu[R]',1,1652240362,1652240362),
('test-menu[U]',1,1652240362,1652240362),
('typeuser[A]',1,1655086199,1655086199),
('typeuser[C]',1,1655086199,1655086199),
('typeuser[D]',1,1655086199,1655086199),
('typeuser[R]',1,1655086199,1655086199),
('typeuser[U]',1,1655086199,1655086199),
('user[A]',1,1652240279,1652240279),
('user[C]',1,1652240279,1652240279),
('user[D]',1,1652240279,1652240279),
('user[R]',1,1652240279,1652240279),
('user[U]',1,1652240279,1652240279);

/*Table structure for table `auth_item_child` */

DROP TABLE IF EXISTS `auth_item_child`;

CREATE TABLE `auth_item_child` (
  `parent` varchar(100) NOT NULL,
  `child` varchar(100) NOT NULL,
  PRIMARY KEY (`parent`,`child`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `auth_item_child` */

insert  into `auth_item_child`(`parent`,`child`) values 
('GROUPMENU-pengadministrasian-umum','level-1[R]'),
('GROUPMENU-pengadministrasian-umum','level-2[C]'),
('GROUPMENU-pengadministrasian-umum','level-2[R]'),
('GROUPMENU-pengadministrasian-umum','profile[C]'),
('GROUPMENU-pengadministrasian-umum','profile[R]'),
('GROUPMENU-pengadministrasian-umum','sub-menu-1[R]'),
('GROUPMENU-pengadministrasian-umum','sub-menu-2[R]'),
('GROUPMENU-pengadministrasian-umum','sub-menu-2[U]'),
('GROUPMENU-pengadministrasian-umum','test-menu-2[D]'),
('GROUPMENU-pengadministrasian-umum','test-menu-2[R]'),
('GROUPMENU-pengadministrasian-umum','test-menu[R]'),
('GROUPMENU-rekam-medik','level-1[C]'),
('GROUPMENU-rekam-medik','level-1[R]'),
('GROUPMENU-rekam-medik','level-2[D]'),
('GROUPMENU-rekam-medik','level-2[R]'),
('GROUPMENU-rekam-medik','role[R]'),
('GROUPMENU-rekam-medik','role[U]'),
('GROUPMENU-rekam-medik','setting[R]'),
('GROUPMENU-rekam-medik','sub-menu-1[R]'),
('GROUPMENU-rekam-medik','sub-menu-2[D]'),
('GROUPMENU-rekam-medik','sub-menu-2[R]'),
('GROUPMENU-rekam-medik','test-menu[R]'),
('GROUPMENU-rekam-medik','user[C]'),
('GROUPMENU-rekam-medik','user[R]');

/*Table structure for table `company_profile` */

DROP TABLE IF EXISTS `company_profile`;

CREATE TABLE `company_profile` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `alias` varchar(100) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `company` varchar(100) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `year` double DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `version` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `company_profile` */

insert  into `company_profile`(`id`,`name`,`alias`,`description`,`company`,`address`,`website`,`year`,`logo`,`version`) values 
(1,'Starter Template','Starter','Starter Template AdminLTE 3 CI','Rumah Sakit Saiful Anwar Malang','Jl. Jaksa Agung Suprapto No.2, Klojen, Kec. Klojen, Kota Malang','',2022,'company_profile-logo_rssa.jpg','1.0.1');

/*Table structure for table `menu` */

DROP TABLE IF EXISTS `menu`;

CREATE TABLE `menu` (
  `id` int(2) NOT NULL AUTO_INCREMENT,
  `name` varchar(128) DEFAULT NULL,
  `slug` varchar(128) DEFAULT NULL,
  `level` int(1) DEFAULT NULL,
  `link` varchar(128) DEFAULT '',
  `icon` varchar(64) DEFAULT '',
  `parent_id` int(11) DEFAULT NULL,
  `urutan` int(11) NOT NULL,
  `type` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

/*Data for the table `menu` */

insert  into `menu`(`id`,`name`,`slug`,`level`,`link`,`icon`,`parent_id`,`urutan`,`type`) values 
(1,'Setting','setting',1,'#','fas fa-cogs',NULL,1,2),
(2,'User','user',2,'user','fas fa-users',1,1,2),
(3,'Menu','menu',2,'menu','fas fa-list',1,2,2),
(4,'Role','role',2,'role','fas fa-project-diagram',1,3,2),
(5,'Test Menu','test-menu',1,'#','fas fa-copy',NULL,1,1),
(6,'Sub Menu 1','sub-menu-1',2,'#','fas fa-copy',5,1,1),
(7,'Sub Menu 2','sub-menu-2',2,'#','fas fa-copy',5,2,1),
(8,'Test Menu 2','test-menu-2',1,'#','fas fa-copy',NULL,2,1),
(9,'Level 1','level-1',3,'#','',6,1,1),
(10,'Level 2','level-2',3,'#','',6,2,1),
(11,'Group Menu','group-menu',2,'groupMenu','fas fa-layer-group',1,4,2),
(23,'Pengadministrasian Umum','pengadministrasian-umum',1,'','',NULL,0,3),
(24,'Rekam Medik','rekam-medik',1,'','',NULL,0,3),
(25,'Profile','profile',1,'profile','fas fa-users',NULL,1,1),
(30,'Company Profile','company-profile',2,'companyProfile','fas fa-building',1,5,2),
(31,'Typeuser','typeuser',2,'typeuser','fas fa-user-check',1,5,2);

/*Table structure for table `profile` */

DROP TABLE IF EXISTS `profile`;

CREATE TABLE `profile` (
  `user_id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `typeuser_id` int(11) DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `profile` */

insert  into `profile`(`user_id`,`name`,`email`,`phone`,`typeuser_id`,`foto`) values 
(1,'Admin ITIKOM','epen.effendy@gmail.com','08990446822',1,'profile-avatar51.png'),
(2,'Effendy','epen.effendy@gmail.com','08990446822',2,NULL);

/*Table structure for table `typeuser` */

DROP TABLE IF EXISTS `typeuser`;

CREATE TABLE `typeuser` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(15) DEFAULT NULL,
  `value` varchar(100) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `typeuser` */

insert  into `typeuser`(`id`,`code`,`value`,`description`) values 
(1,'SA','Super Admin','Super Admin'),
(2,'ADM','Admin','Admin');

/*Table structure for table `user` */

DROP TABLE IF EXISTS `user`;

CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `password_hash` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `auth_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `confirmed_at` int(11) DEFAULT NULL,
  `unconfirmed_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `blocked_at` int(11) DEFAULT NULL,
  `registration_ip` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `flags` int(11) DEFAULT 0,
  `last_login_at` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

/*Data for the table `user` */

insert  into `user`(`id`,`username`,`email`,`password_hash`,`auth_key`,`confirmed_at`,`unconfirmed_email`,`blocked_at`,`registration_ip`,`created_at`,`updated_at`,`flags`,`last_login_at`,`status`) values 
(1,'adminit','epen.effendy@gmail.com','$2y$10$NymUEHW3ID.QtzZXJaBYSedF4kANCXyvAHO0y9.wUQxxSVyAZu216',NULL,NULL,NULL,NULL,NULL,1654670581,1654831094,NULL,1667258910,1),
(2,'epen_effendy','epen.effendy@gmail.com','$2y$10$YT5e.qC5LvLAEFLKY3w6z.tARUggxONK4AxHTGob5w7.A3hIum3TC',NULL,NULL,NULL,NULL,NULL,1654738531,1654738531,NULL,1660183186,1),
(7,'admindk','admin@mail.com','$2y$10$RhSuuoDPoKdlhwmtd0Es.uhmkFgfl.fkBYLsyEM52MUsnHy4Oi5/e',NULL,NULL,NULL,NULL,NULL,1655432277,1655432277,NULL,NULL,1);

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
