-- Adminer 4.2.4 MySQL dump

SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

CREATE TABLE `menu` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `nama` varchar(50) NOT NULL,
  `deskripsi` text,
  `controller` varchar(255) DEFAULT NULL,
  `actions` text,
  `default_action` varchar(255) DEFAULT NULL,
  `icon` varchar(50) DEFAULT NULL,
  `parent_id` int(11) DEFAULT '0',
  `level` int(11) DEFAULT '1',
  `status_tampil` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=744;

INSERT INTO `menu` (`id`, `nama`, `deskripsi`, `controller`, `actions`, `default_action`, `icon`, `parent_id`, `level`, `status_tampil`, `created_at`, `updated_at`) VALUES
(1,	'Beranda',	'',	'site',	'[\"index\"]',	'index',	'fa fa-home',	NULL,	1,	1,	'2018-12-18 16:12:35',	'2018-12-26 09:33:30'),
(2,	'Role',	'',	'role',	'[\"index\",\"create\",\"view\",\"update\",\"delete\"]',	'index',	'fa fa-user-md',	4,	2,	1,	'2018-12-18 16:13:09',	'2018-12-26 09:36:52'),
(3,	'Menu',	'',	'menu',	'[\"index\",\"create\",\"view\",\"update\",\"delete\"]',	'index',	'fa fa-th-list',	4,	2,	1,	'2018-12-20 06:33:57',	'2018-12-26 09:37:18'),
(4,	'User & Role',	'',	'',	'\"\"',	'',	'fa fa-lock',	NULL,	1,	1,	'2018-12-20 07:07:19',	'2018-12-29 11:19:23'),
(5,	'Role Menu',	'',	'role-menu',	'[\"create\",\"index\",\"update\",\"delete\",\"up\",\"down\",\"view\"]',	'index',	'fa fa-check-square-o',	4,	2,	1,	'2018-12-20 07:18:45',	'2018-12-26 09:38:03'),
(6,	'Pengguna',	'',	'user',	'[\"create\",\"index\",\"update\",\"delete\",\"change-password\",\"view\"]',	'index',	'fa fa-users',	4,	2,	1,	'2018-12-20 09:09:21',	'2018-12-29 11:19:14'),
(7,	'Anggaran',	NULL,	'',	'\"\"',	'',	'fa fa-money',	NULL,	1,	1,	'2018-12-29 11:14:08',	'2019-01-01 12:57:10'),
(8,	'Upload Anggaran',	NULL,	'anggaran',	'[\"upload\"]',	'',	'fa fa-upload',	7,	2,	1,	'2018-12-29 11:15:19',	'2019-01-01 12:58:27'),
(9,	'Overrun',	NULL,	'anggaran',	'[\"overrun\"]',	'',	'fa fa-share-square',	7,	2,	1,	'2018-12-29 11:15:39',	'2019-01-01 13:02:04'),
(10,	'Realokasi',	NULL,	'anggaran',	'[\"realokasi\"]',	'',	'fa fa-retweet',	7,	2,	1,	'2018-12-29 11:15:54',	'2019-01-01 12:59:43'),
(11,	'Laporan',	NULL,	'anggaran',	'[\"laporan\"]',	'',	'fa fa-file-text-o',	7,	2,	1,	'2018-12-29 11:16:07',	'2019-01-01 13:00:10'),
(12,	'Sales Order',	NULL,	'',	'\"\"',	'',	'fa fa-shopping-cart',	NULL,	1,	1,	'2018-12-29 11:16:29',	'2019-01-01 12:57:19'),
(13,	'Input Sales Order',	NULL,	'sales-order',	'[\"create\"]',	'',	'fa fa-pencil',	12,	2,	1,	'2018-12-29 11:17:27',	'2019-01-01 13:00:49'),
(14,	'Display Sales Order',	NULL,	'sales-order',	'[\"index\"]',	'',	'fa fa-eye',	12,	2,	1,	'2018-12-29 11:17:46',	'2019-01-01 13:00:58'),
(15,	'Invoicing',	NULL,	'sales-order',	'[\"invoicing\"]',	'',	'fa fa-fax',	12,	2,	1,	'2018-12-29 11:18:05',	'2019-01-01 13:00:33'),
(16,	'Laporan',	NULL,	'sales-order',	'[\"laporan\"]',	'',	'fa fa-file-text-o',	12,	2,	1,	'2018-12-29 11:18:20',	'2019-01-01 13:00:18'),
(17,	'Master Data',	NULL,	'',	'\"\"',	'',	'fa fa-database',	NULL,	1,	1,	'2019-01-01 13:25:16',	'2019-01-01 13:25:16'),
(18,	'Department',	NULL,	'department',	'[\"index\",\"create\",\"view\",\"update\",\"delete\"]',	'index',	'fa fa-bank',	17,	2,	1,	'2019-01-01 13:30:45',	'2019-01-01 13:34:54');

CREATE TABLE `migration` (
  `version` varchar(180) NOT NULL,
  `apply_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `migration` (`version`, `apply_time`) VALUES
('m000000_000000_base',	1545108178),
('m130524_201442_init',	1545108181),
('m181211_160017_create_table_setting',	1545108182);


CREATE TABLE `peserta_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `peserta_training` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nomor_peserta` varchar(255) NOT NULL,
  `waktu_daftar` datetime NOT NULL,
  `status_bayar` int(11) NOT NULL,
  `tanggal_bayar` date NOT NULL,
  `jumlah_bayar` int(11) NOT NULL,
  `bukti_transfer` varchar(255) NOT NULL,
  `file_sertifikat` varchar(255) NOT NULL,
  `peserta_status_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `peserta_status_id` (`peserta_status_id`),
  CONSTRAINT `peserta_training_ibfk_1` FOREIGN KEY (`peserta_status_id`) REFERENCES `peserta_status` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `riwayat_pembayaran_vendor` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `jenis` varchar(255) NOT NULL,
  `jumlah` int(11) NOT NULL,
  `keterangan` text NOT NULL,
  `training_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `training_id` (`training_id`),
  CONSTRAINT `riwayat_pembayaran_vendor_ibfk_1` FOREIGN KEY (`training_id`) REFERENCES `training` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `nama` varchar(50) NOT NULL,
  `deskripsi` text,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `role` (`id`, `nama`, `deskripsi`, `status`, `created_at`, `updated_at`) VALUES
(1,	'Super Admin',	'Super admin yang mempunyai semua hak di dalam aplikasi',	1,	'2018-12-18 16:11:28',	'2018-12-29 11:11:40'),
(2,	'Admin',	'Admin Umum\r\n',	1,	'2018-12-20 08:27:06',	'2018-12-29 11:11:16');

CREATE TABLE `role_menu` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` int(11) unsigned DEFAULT NULL,
  `menu_id` int(11) unsigned DEFAULT NULL,
  `parameter` varchar(255) DEFAULT NULL,
  `label` varchar(255) DEFAULT NULL,
  `posisi` int(11) unsigned DEFAULT NULL,
  `privileges` varchar(255) NOT NULL COMMENT 'misal: crud',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `role_id` (`role_id`),
  KEY `menu_id` (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=744;

INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `parameter`, `label`, `posisi`, `privileges`, `created_at`, `updated_at`) VALUES
(4,	1,	4,	'',	'',	3,	'\"\"',	'2018-12-20 07:22:17',	'2018-12-26 09:47:19'),
(6,	1,	2,	'',	'',	4,	'[\"index\",\"create\",\"view\",\"update\",\"delete\"]',	'2018-12-20 07:45:09',	'2018-12-29 11:11:28'),
(7,	1,	5,	'',	'',	6,	'[\"create\",\"index\",\"update\",\"delete\",\"up\",\"down\",\"view\"]',	'0000-00-00 00:00:00',	'2018-12-21 10:05:45'),
(9,	1,	6,	'',	'User',	2,	'[\"create\",\"index\",\"update\",\"delete\",\"change-password\",\"view\"]',	'2018-12-20 09:22:42',	'2018-12-26 09:49:00'),
(17,	1,	1,	'',	'',	1,	'[\"index\"]',	'2018-12-20 16:06:16',	'2018-12-26 09:34:05'),
(18,	2,	1,	'',	'',	1,	'[\"index\"]',	'2018-12-20 16:11:03',	'2018-12-26 09:33:58'),
(26,	1,	3,	'',	'',	5,	'[\"index\",\"create\",\"view\",\"update\",\"delete\"]',	'2018-12-20 21:21:30',	'2018-12-22 09:40:11'),
(37,	1,	17,	'',	'',	7,	'\"\"',	'2019-01-01 13:31:00',	'2019-01-10 18:16:05'),
(38,	1,	18,	'',	'',	8,	'[\"index\",\"create\",\"view\",\"update\",\"delete\"]',	'2019-01-01 13:31:06',	'2019-01-10 18:16:05');

CREATE TABLE `setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) DEFAULT NULL,
  `deskripsi` varchar(255) DEFAULT NULL,
  `nilai` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `trainer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) NOT NULL,
  `alamat` text NOT NULL,
  `telepon` varchar(255) NOT NULL,
  `bidang` varchar(255) NOT NULL,
  `kompetensi` varchar(255) NOT NULL,
  `pendidikan` varchar(255) NOT NULL,
  `sertifikat` varchar(255) NOT NULL,
  `pengalaman` text NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `training` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) NOT NULL,
  `deskripsi` text NOT NULL,
  `peserta_minimum` int(11) NOT NULL,
  `peserta_maksimum` int(11) NOT NULL,
  `tempat` text NOT NULL,
  `tanggal_mulai` date NOT NULL,
  `tanggal_selesai` date NOT NULL,
  `biaya` int(11) NOT NULL,
  `diskon` int(11) NOT NULL,
  `vendor_id` int(11) NOT NULL,
  `training_status_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `vendor_id` (`vendor_id`),
  KEY `training_status_id` (`training_status_id`),
  CONSTRAINT `training_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `vendor` (`id`),
  CONSTRAINT `training_ibfk_2` FOREIGN KEY (`training_status_id`) REFERENCES `training_status` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `training_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


-- 2019-01-10 23:31:23
