-- 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,
  `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` date NOT NULL DEFAULT current_timestamp(),
  `valid_at` date NOT NULL DEFAULT current_timestamp(),
  `expired_at` date NOT NULL,
  `creator` int(3) NOT NULL,
  `edited_at` date DEFAULT NULL,
  `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;


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` date NOT NULL DEFAULT current_timestamp(),
  `privilage` tinyint(1) NOT NULL DEFAULT 0,
  `status` 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`, `privilage`, `status`, `max_user`) VALUES
(1,	'root',	'14Ll9fZ15hncw',	'146012323259b6163952e48',	'Administrator',	'2017-09-09',	1,	0,	1),
(2,	'user',	'18jL3uoFwSAx.',	'18211527759b374b270bd3',	'User',	'2017-09-09',	0,	0,	5);

-- 2017-09-11 06:16:24
