--
-- Host: localhost    Database: fasaadmin_com
-- ------------------------------------------------------


--
-- Table structure for table `faman_auth_assignment`
--

CREATE TABLE `faman_auth_assignment` (
  `item_name` varchar(64) NOT NULL,
  `user_id` varchar(64) NOT NULL,
  `created_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`item_name`,`user_id`),
  CONSTRAINT `faman_auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `faman_auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `faman_auth_assignment`
--

INSERT INTO `faman_auth_assignment` VALUES ('authenticated','47',1499238204),('customer_service_manager','40',1491252240),('resapi_invoice_admin','242',1510071995),('resapi.admin','42',1497896621),('resapi.scique','46',1499088760),('super_admin','35',1471452388);

--
-- Table structure for table `faman_auth_item`
--

CREATE TABLE `faman_auth_item` (
  `name` varchar(64) NOT NULL,
  `type` int(11) NOT NULL,
  `description` text DEFAULT NULL,
  `rule_name` varchar(64) DEFAULT NULL,
  `data` text DEFAULT NULL,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`name`),
  KEY `rule_name` (`rule_name`),
  KEY `idx-auth_item-type` (`type`),
  CONSTRAINT `faman_auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `faman_auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `faman_auth_item`
--



--
-- Table structure for table `faman_auth_item_child`
--

CREATE TABLE `faman_auth_item_child` (
  `parent` varchar(64) NOT NULL,
  `child` varchar(64) NOT NULL,
  PRIMARY KEY (`parent`,`child`),
  KEY `child` (`child`),
  CONSTRAINT `faman_auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `faman_auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `faman_auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `faman_auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `faman_auth_item_child`
--



--
-- Table structure for table `faman_auth_rule`
--

CREATE TABLE `faman_auth_rule` (
  `name` varchar(64) NOT NULL,
  `data` text DEFAULT NULL,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `faman_auth_rule`
--


--
-- Table structure for table `faman_menu`
--

CREATE TABLE `faman_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL,
  `parent` int(11) DEFAULT NULL,
  `route` varchar(255) DEFAULT NULL,
  `order` int(11) DEFAULT NULL,
  `data` blob DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `parent` (`parent`),
  CONSTRAINT `faman_menu_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `faman_menu` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `faman_menu`
--

INSERT INTO `faman_menu` VALUES (1,'Home',NULL,'/site/index',0,'{\"icon\":\"home\"}'),(2,'RBAC',NULL,NULL,99,'{\"icon\":\"map-signs\"}'),(3,'Role',2,'/rbac/role/index',3,'{\"icon\":\"gears\"}'),(4,'Route',2,'/rbac/route/index',5,'{\"icon\":\"road\"}'),(5,'Permission',2,'/rbac/permission/index',4,'{\"icon\":\"gavel\"}'),(6,'Assignment',2,'/rbac/assignment/index',1,'{\"icon\":\"pencil\"}'),(7,'Menu',2,'/rbac/menu/index',2,'{\"icon\":\"navicon\"}'),(8,'Member',NULL,'/member/index',1,'{\"icon\":\"user\"}'),(10,'Audit',NULL,NULL,10,'{\"icon\":\"cc\"}'),(11,'Audit Balance',10,'/audit/index',1,NULL),(12,'Audit Member History',10,'/audit/member',1,NULL),(13,'Fee',NULL,NULL,8,'{\"icon\":\"percent\"}'),(14,'Fee Special',13,'/fee-special/index',6,'{\"icon\":\"percent\"}'),(15,'Cashback',NULL,NULL,7,'{\"icon\":\"money\"}'),(16,'Cashback Rule',15,'/cashback-rule/index',1,NULL),(17,'Cashback List',15,'/cashback/index',2,NULL),(18,'Administrator',NULL,NULL,98,'{\"icon\":\"gear\"}'),(19,'Log Admin',18,'/log-admin/index',2,NULL),(20,'Admin',18,'/admin/index',NULL,NULL),(21,'SMS',NULL,NULL,97,'{\"icon\":\"mobile-phone\"}'),(22,'Quesms',21,'/quesms/index',1,'{\"icon\":\"wechat\"}'),(23,'SMS Gateway',21,'/sms-gateway/index',2,'{\"icon\":\"arrows\"}'),(24,'SMS Route',21,'/sms-route/index',3,'{\"icon\":\"arrows-alt\"}'),(25,'Transaction',NULL,'/transaction/index',3,'{\"icon\":\"money\"}'),(26,'SCI',NULL,NULL,97,'{\"icon\":\"shopping-cart\"}'),(27,'Sci Queue',26,'/sci-que/index',1,'{\"icon\":\"phone-square\"}'),(28,'Bank',NULL,NULL,5,'{\"icon\":\"bank\"}'),(29,'Payment Mode',28,'/payment-mode/index',3,'{\"icon\":\"credit-card\"}'),(30,'Bank',28,'/bank/index',1,'{\"icon\":\"bank\"}'),(31,'Mutasi Bank',10,'/mutasi-bank/index',3,'{\"icon\":\"bank\"}'),(32,'Facility & Schedule',NULL,NULL,17,'{\"icon\":\"calendar\"}'),(33,'Holiday',32,'/holiday/index',1,'{\"icon\":\"holiday\"}'),(34,'Facility',32,'/facility/index',2,'{\"icon\":\"building\"}'),(35,'Schedule',32,'/facility-holiday/index',3,'{\"icon\":\"calendar\"}'),(36,'Cashback Group',15,'/cashback/group',3,NULL),(37,'Fee Report',10,'/audit/fee-report',5,NULL),(38,'Trans Rules',NULL,NULL,9,'{\"icon\":\"user-police\"}'),(39,'Kuota',38,'/transaksi-kuota/index',1,'{\"icon\":\"gauge\"}'),(40,'Limit Special',38,'/transaksi-limit-special/index',2,'{\"icon\":\"gauge-max\"}'),(41,'Fee',38,'/fee/index',2,'{\"icon\":\"gauge-max\"}'),(42,'Limit',38,'/transaksi-limit/index',2,'{\"icon\":\"gauge-max\"}'),(43,'Member',NULL,NULL,1,'{\"icon\":\"user\"}'),(44,'Member List',8,'/member/index',1,'{\"icon\":\"user\"}'),(45,'Ban List',8,'/blacklist/index',2,'{\"icon\":\"ban\"}');


