-- 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 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;


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 '0000-00-00 00:00:00',
  `valid_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `expired_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `creator` int(3) NOT NULL,
  `edited_at` timestamp NULL DEFAULT NULL,
  `editor` int(3) DEFAULT NULL,
  `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`, `editor`, `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,	NULL,	NULL,	'Pengambilan &amp; pengisian KRS tanggal **21 - 26 Agustus 2017**.',	1,	5000),
(2,	1,	'2017-08-15 00:00:00',	'2017-09-16 00:00:00',	'2017-09-20 00:00:00',	1,	'2017-09-20 00:00:00',	1,	'**Almamater gelombang 3** sudah dapat diambil di ruang **Student Admission Officer (Marketing)**.',	0,	5000),
(3,	1,	'2017-09-10 00:00:00',	'2017-09-11 00:00:00',	'2017-09-30 00:00:00',	1,	NULL,	NULL,	'Perkuliahan semester ganjil dimulai pada tanggal **11 September 2017**.',	1,	5000),
(4,	3,	'0000-00-00 00:00:00',	'2017-09-30 00:00:00',	'2017-09-30 00:00:00',	1,	'2017-09-29 00:00:00',	1,	'Kelas **TI-123** pindah ke ruangan **321** untuk hari ini *30 Sep 2017*',	1,	5000)
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`), `editor` = VALUES(`editor`), `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` char(23) NOT NULL,
  `full_name` varchar(50) NOT NULL,
  `registered_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `privilege` tinyint(1) NOT NULL DEFAULT 0,
  `max_user` int(1) NOT NULL DEFAULT 5,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


-- 2017-10-05 09:25:05
