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

INSERT INTO `kategori` (`id`, `category`, `background`, `foreground`, `status`) VALUES
(1,	'Akademik',	'#ff0000',	'#b7b7b7',	1),
(2,	'Kemahasiswaan',	'#0071ff',	'#ff0000',	1),
(3,	'Pindah Kelas',	'#fffe00',	'#e900ff',	1);

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 DEFAULT 0,
  `editor` int(3) DEFAULT NULL,
  `content` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  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`) VALUES
(1,	2,	'2017-08-20 00:00:00',	'2017-08-21 00:00:00',	'2017-08-26 00:00:00',	1,	NULL,	NULL,	'Pengambilan &amp; pengisian KRS tanggal **21 - 26 Agustus 2017**.',	0),
(2,	1,	'2017-08-15 00:00:00',	'2017-09-16 00:00:00',	'2017-09-30 00:00:00',	1,	NULL,	NULL,	'**Almamater gelombang 3** sudah dapat diambil di ruang **Student Admission Officer (Marketing)**.',	1),
(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);

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;

INSERT INTO `users` (`id`, `username`, `password`, `salt`, `full_name`, `registered_at`, `privilege`, `max_user`) VALUES
(1,	'root',	'14Ll9fZ15hncw',	'146012323259b6163952e48',	'Administrator',	'2017-09-09 00:00:00',	1,	1),
(2,	'user',	'18jL3uoFwSAx.',	'18211527759b374b270bd3',	'User',	'2017-09-09 00:00:00',	0,	5);

-- 2017-09-18 02:55:26
