text: # ************************************************************
  # Sequel Pro SQL dump
  # Version 4541
  #
  # http://www.sequelpro.com/
  # https://github.com/sequelpro/sequelpro
  #
  # Host: 127.0.0.1 (MySQL 5.7.22)
  # Database: fti_insight
  # Generation Time: 2018-08-01 07:03:52 +0000
  # ************************************************************
  
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  
  # Dump of table permission_role
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `permission_role`;
  
  CREATE TABLE `permission_role` (
    `permission_id` int(10) unsigned NOT NULL,
    `role_id` int(10) unsigned NOT NULL,
    PRIMARY KEY (`permission_id`,`role_id`),
    KEY `permission_role_role_id_foreign` (`role_id`),
    CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  LOCK TABLES `permission_role` WRITE;
  /*!40000 ALTER TABLE `permission_role` DISABLE KEYS */;
  
  INSERT INTO `permission_role` (`permission_id`, `role_id`)
  VALUES
  	(1,1),
  	(3,1),
  	(4,1),
  	(5,1),
  	(1,2),
  	(2,2),
  	(5,2),
  	(1,3),
  	(3,3),
  	(4,3);
  
  /*!40000 ALTER TABLE `permission_role` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  # Dump of table permissions
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `permissions`;
  
  CREATE TABLE `permissions` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    `display_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
    `description` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    UNIQUE KEY `permissions_name_unique` (`name`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  LOCK TABLES `permissions` WRITE;
  /*!40000 ALTER TABLE `permissions` DISABLE KEYS */;
  
  INSERT INTO `permissions` (`id`, `name`, `display_name`, `description`, `created_at`, `updated_at`)
  VALUES
  	(1,'user.show-all',NULL,NULL,'2018-07-24 17:26:36','2018-07-24 17:26:36'),
  	(2,'user.edit',NULL,NULL,'2018-07-24 17:26:44','2018-07-24 17:26:44'),
  	(3,'user.add',NULL,NULL,'2018-07-24 17:26:54','2018-07-24 17:26:54'),
  	(4,'user.remove',NULL,NULL,'2018-07-24 17:27:00','2018-07-24 17:27:00'),
  	(5,'user.trash',NULL,NULL,'2018-07-24 17:27:04','2018-07-24 17:27:04');
  
  /*!40000 ALTER TABLE `permissions` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  # Dump of table role_user
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `role_user`;
  
  CREATE TABLE `role_user` (
    `user_id` int(10) unsigned NOT NULL,
    `role_id` int(10) unsigned NOT NULL,
    PRIMARY KEY (`user_id`,`role_id`),
    KEY `role_user_role_id_foreign` (`role_id`),
    CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  LOCK TABLES `role_user` WRITE;
  /*!40000 ALTER TABLE `role_user` DISABLE KEYS */;
  
  INSERT INTO `role_user` (`user_id`, `role_id`)
  VALUES
  	(1,1),
  	(2,2),
  	(3,3);
  
  /*!40000 ALTER TABLE `role_user` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  # Dump of table roles
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `roles`;
  
  CREATE TABLE `roles` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    `display_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
    `description` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    UNIQUE KEY `roles_name_unique` (`name`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  LOCK TABLES `roles` WRITE;
  /*!40000 ALTER TABLE `roles` DISABLE KEYS */;
  
  INSERT INTO `roles` (`id`, `name`, `display_name`, `description`, `created_at`, `updated_at`)
  VALUES
  	(1,'super',NULL,NULL,'2018-07-24 16:52:37','2018-07-25 11:31:13'),
  	(2,'admin',NULL,NULL,'2018-07-24 16:52:59','2018-07-24 16:52:59'),
  	(3,'manager',NULL,NULL,'2018-07-24 16:53:05','2018-07-24 16:53:05');
  
  /*!40000 ALTER TABLE `roles` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  # Dump of table user_profile
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `user_profile`;
  
  CREATE TABLE `user_profile` (
    `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `phone` int(11) DEFAULT NULL,
    `sex` int(4) DEFAULT '0',
    `city` varchar(255) DEFAULT NULL,
    `hobby` varchar(255) DEFAULT NULL,
    `motto` varchar(255) DEFAULT NULL,
    `description` text,
    PRIMARY KEY (`user_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  LOCK TABLES `user_profile` WRITE;
  /*!40000 ALTER TABLE `user_profile` DISABLE KEYS */;
  
  INSERT INTO `user_profile` (`user_id`, `phone`, `sex`, `city`, `hobby`, `motto`, `description`)
  VALUES
  	(1,NULL,0,NULL,NULL,NULL,NULL);
  
  /*!40000 ALTER TABLE `user_profile` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  # Dump of table users
  # ------------------------------------------------------------
  
  DROP TABLE IF EXISTS `users`;
  
  CREATE TABLE `users` (
    `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `username` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    `email` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    `password` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    `remember_token` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
    `date_created` timestamp NULL DEFAULT NULL,
    `date_modified` timestamp NULL DEFAULT NULL,
    `firstname` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
    `lastname` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
    `is_deleted` int(4) DEFAULT '0',
    `status` int(4) DEFAULT '0',
    `avatar` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
    PRIMARY KEY (`user_id`),
    UNIQUE KEY `users_email_unique` (`email`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  LOCK TABLES `users` WRITE;
  /*!40000 ALTER TABLE `users` DISABLE KEYS */;
  
  INSERT INTO `users` (`user_id`, `username`, `email`, `password`, `remember_token`, `date_created`, `date_modified`, `firstname`, `lastname`, `is_deleted`, `status`, `avatar`)
  VALUES
  	(1,'tuantruong-super','super@gmail.com','$2y$10$.D/L4ASuPEHQhdPBpD9GEOwhVNTWSG/0cf19w4cJxuSev.uRzpRUS','Ghw6adGN5pIeOW1KaU7UvUYsVYkOPHW6B5O5TTHvrCzWGncffmtvsKYrfqUU','2018-07-24 03:51:02','2018-07-24 08:28:32','super','master',0,1,NULL),
  	(2,'tuantruong-admin','admin@gmail.com','$2y$10$N.K8ndL2TlVSgxAXI11Q0ONiuJafaHK1/ZX8JAty6cVISGBsg1TG2','pvFduTe4n23h7XLtYfXrQlIeHl6DOQIDpl14xBJ4pxKMiwvwZCit8phk2MAA','2018-07-24 07:22:40','2018-07-25 04:23:59','admin','my name is',0,1,NULL),
  	(3,'tuantruong-manager','manager@gmail.com','$2y$10$y/SHH5vaEiita8/7bijRb.VqM0hzU7Xb9o2KLaNgyyADdOzaZIk7.','jCht9yFQom3e4iz4VgQwkfF0F6Zn8ybbZFYkcm3LuYB04MXym0f5hMqya1mC','2018-07-24 07:23:18','2018-07-25 04:38:25','quản lý','lê văn',0,1,'http://insight.local/public/images/favicon.ico');
  
  /*!40000 ALTER TABLE `users` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  