-- Adminer 4.3.0 MySQL dump

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

DROP DATABASE IF EXISTS `pengumuman`;
CREATE DATABASE `pengumuman` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `pengumuman`;

DROP TABLE IF EXISTS `client_session`;
CREATE TABLE `client_session` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip_address` varchar(17) NOT NULL,
  `uid` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `kategori`;
CREATE TABLE `kategori` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `category` varchar(20) NOT NULL,
  `background` char(7) NOT NULL DEFAULT '#ffffff',
  `foreground` char(7) NOT NULL DEFAULT '#000000',
  `status` tinyint(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `kategori` (`id`, `category`, `background`, `foreground`, `status`) VALUES
(1,	'Akademik',	'#22bc73',	'#c01d1d',	1),
(2,	'Kemahasiswaan',	'#dbcbdb',	'#4b5e5d',	1),
(3,	'Pindah Kelas',	'#d2ff00',	'#900404',	1),
(4,	'Kehadiran Dosen',	'#e02a2a',	'#f4d917',	1),
(5,	'Keuangan',	'#ed0c61',	'#7bf4d8',	1)
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `category` = VALUES(`category`), `background` = VALUES(`background`), `foreground` = VALUES(`foreground`), `status` = VALUES(`status`);

DROP TABLE IF EXISTS `pengumuman`;
CREATE TABLE `pengumuman` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `category` int(3) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `valid_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `expired_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `creator` int(3) NOT NULL,
  `edited_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `content` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `delay` int(11) NOT NULL DEFAULT 5000,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `pengumuman` (`id`, `category`, `created_at`, `valid_at`, `expired_at`, `creator`, `edited_at`, `content`, `status`, `delay`) VALUES
(1,	2,	'2017-09-20 00:00:00',	'2017-09-26 00:00:00',	'2017-09-29 00:00:00',	1,	'2017-10-06 00:00:00',	'Pengambilan &amp; pengisian KRS tanggal **21 - 26 Agustus 2017**.',	0,	11844),
(2,	1,	'2017-08-15 00:00:00',	'2017-09-16 00:00:00',	'2017-09-20 00:00:00',	1,	'2017-10-06 00:00:00',	'**Almamater gelombang 3** sudah dapat diambil di ruang **Student Admission Officer (Marketing)**.',	0,	8148),
(3,	1,	'2017-09-10 00:00:00',	'2017-09-11 00:00:00',	'2017-09-30 00:00:00',	1,	'2017-10-05 00:00:00',	'Perkuliahan semester ganjil dimulai pada tanggal **11 September 2017**',	0,	5880),
(4,	3,	'2017-09-30 00:00:00',	'2017-09-30 00:00:00',	'2017-09-30 00:00:00',	1,	'2017-10-06 00:00:00',	'Kelas **TI-123** pindah ke ruangan **321** untuk hari ini *30 Sep 2017*',	0,	5964),
(5,	3,	'2017-10-06 00:00:00',	'2017-10-06 00:00:00',	'2017-10-07 00:00:00',	1,	'2017-10-24 08:39:03',	'Kelas **TI-345** pindah ke ruangan **543** di *Lantai 1 Gedung 1*',	0,	5460),
(6,	1,	'2017-10-19 06:39:07',	'2017-10-16 00:00:00',	'2017-10-31 00:00:00',	2,	'2017-10-19 06:39:07',	'Pengambilan **IJAZAH** dan **TRANSKIP NILAI** dimulai dari tanggal *16 Oktober 2017*. Sesuai dengan jadwal hari *SENIN*, *RABU* dan *KAMIS*. Pengambilan dimulai pukul *13.00 WIB*.',	1,	15036),
(7,	1,	'2017-10-19 09:20:14',	'2017-10-16 00:00:00',	'2017-10-31 00:00:00',	2,	'2017-10-19 09:20:14',	'Syarat pengambilan **IJAZAH** dan **TRANSKIP NILAI**(Menyerahkan bukti lunas dari *KASIR*)(Telah selesai mengumpulkan **HARDCOVER**, **SUMBANGAN BUKU** dan **CD BURNING**)',	1,	14364),
(8,	1,	'2017-10-19 09:21:11',	'2017-10-30 00:00:00',	'2017-11-03 00:00:00',	2,	'2017-10-19 09:21:11',	'*Ujian Tengah Semester* (**UTS**) Ganjil **TINGKAT I** (satu) dan **TINGKAT III** (tiga) TA 2017/2018 akan dilaksanakan pada tanggal *30 Oktober - 03 November*',	2,	13356),
(9,	1,	'2017-10-24 05:14:11',	'2017-11-01 00:00:00',	'2017-11-10 00:00:00',	2,	'2017-10-24 05:14:11',	'Ujian Tengan Semester (**UTS**) Ganjil **TINGKAT II** (dua) dan **TINGKAT IV** (empat) TA 2017/2018 akan dilaksanakan pada tanggal *06 November - 10 November*',	2,	13272)
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `category` = VALUES(`category`), `created_at` = VALUES(`created_at`), `valid_at` = VALUES(`valid_at`), `expired_at` = VALUES(`expired_at`), `creator` = VALUES(`creator`), `edited_at` = VALUES(`edited_at`), `content` = VALUES(`content`), `status` = VALUES(`status`), `delay` = VALUES(`delay`);

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `username` varchar(25) NOT NULL,
  `password` char(13) NOT NULL,
  `salt` varchar(136) NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `registered_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `privilege` tinyint(1) NOT NULL DEFAULT 0,
  `flag` int(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `users` (`id`, `username`, `password`, `salt`, `full_name`, `registered_at`, `privilege`, `flag`) VALUES
(1,	'root',	'de1redtRYxT3c',	'def0000050fffcb5d95f0ae752fca19d57527d838edb2cf4db5e8db076b79cc9e1266e7d8aae386d13fd563280cf6b43a1e75a6a96f3ed1d5ff31cee7201d4db1e685b1b',	'Administrator',	'2017-09-09 00:00:00',	0,	0),
(2,	'user',	'deH2lu2rESwc2',	'def000007110733d54cd9104ad08d431c0548dabd0f9f321be615154efe797b49bcf98e5741ca5b9a0b27f75f4e3da6b8f42b40b8d5e6c339b07bb494d778e70c6e50e6b',	'User',	'2017-09-09 00:00:00',	0,	0),
(3,	'user1',	'deR4vbG/nwDqc',	'def00000d28f54284312e3ca819e519200f622141b3abb15408a4ad99b8cc5317eeb9cfb81db76a80de265299682fd90cca37c5e0be44f32ac0e353ae982f00019828d64',	'User1',	'2017-10-14 00:00:00',	0,	0),
(4,	'user2',	'deOlI/PdO3rTw',	'def0000078f896007c96d718ba977f2a71b4e338b15c831436448c873d1118aa029de6ecf3e2c2ca8297e0f2bd2155f4e41be6ed69f03998861eda4bd28b36f808ee5e56',	'User 2',	'2017-10-19 00:00:00',	0,	0)
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `username` = VALUES(`username`), `password` = VALUES(`password`), `salt` = VALUES(`salt`), `full_name` = VALUES(`full_name`), `registered_at` = VALUES(`registered_at`), `privilege` = VALUES(`privilege`), `flag` = VALUES(`flag`);

-- 2017-10-24 09:28:02
