-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `admin123`
--

-- --------------------------------------------------------

--
-- Table structure for table `activities`
--

CREATE TABLE `activities` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `module` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `unique_id` int(11) DEFAULT NULL,
  `secondary_id` int(11) DEFAULT NULL,
  `activity` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ip` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `custom_fields`
--

CREATE TABLE `custom_fields` (
  `id` int(11) NOT NULL,
  `form` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `name` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `title` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `options` text COLLATE utf8_unicode_ci,
  `is_required` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `menus`
--

CREATE TABLE `menus` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `order` int(11) DEFAULT NULL,
  `visible` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `menus`
--

INSERT INTO `menus` (`id`, `name`, `order`, `visible`) VALUES
(18, 'dashboard', 2, 1),
(19, 'admin', 1, 0),
(20, 'appusers', 1, 0);

-- --------------------------------------------------------

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `category`, `display_name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'create-post', 'Post', 'Create Posts', 'create new blog posts', '2019-01-24 00:52:17', '2019-01-24 00:52:17'),
(3, 'update_permission', 'Permissions', 'Permission', 'Permission module can edit permission', NULL, NULL),
(4, 'role-create', 'Roles', 'Roles', 'Role module can edit permission', NULL, NULL),
(5, 'role-edit', 'Roles', 'Roles', 'Role module can edit permission', NULL, NULL),
(6, 'role-delete', 'Roles', 'Roles', 'Role module can edit permission', NULL, NULL),
(7, 'create-user', 'Users', 'Users', NULL, NULL, NULL),
(8, 'manage_template', 'configuration', 'manage_template', 'manage_template', NULL, NULL),
(9, 'delete-user', 'Users', 'Users Manage', NULL, NULL, NULL),
(10, 'manage_users', 'Users', 'Users Manage', NULL, NULL, NULL),
(11, 'edit-user', 'Users', 'Users Manage', NULL, NULL, NULL),
(12, 'change_user_status', 'Users', 'Users Manage', NULL, NULL, NULL),
(13, 'manage_configuration', 'configuration', 'manage configuration', NULL, NULL, NULL),
(14, 'view_app_users', 'app users', NULL, NULL, NULL, NULL),
(15, 'change_app_user_status', 'app users', NULL, NULL, NULL, NULL),
(16, 'manage_app_users', 'app users', NULL, NULL, NULL, NULL),
(17, 'manage_stations', 'Stations', NULL, NULL, NULL, NULL),
(18, 'settings', 'configuration', 'site settings', 'manage site settings', NULL, NULL),
(20, 'create_stations', 'Stations', NULL, NULL, NULL, NULL),
(21, 'change_station_status', 'Stations', NULL, NULL, NULL, NULL),
(22, 'edit-stations', 'Stations', NULL, NULL, NULL, NULL),
(23, 'vehicle_masters', 'configuration', 'site settings', 'manage site settings', NULL, NULL),
(24, 'location_masters', 'configuration', 'site settings', 'manage site settings', NULL, NULL),
(25, 'masters_menu', 'configuration', 'site settings', 'manage site settings', NULL, NULL),
(26, 'role-manage', 'Roles', 'Roles', 'Role module can edit permission', NULL, NULL),
(27, 'manage_franchise', 'franchise', NULL, NULL, NULL, NULL),
(28, 'change_franchise_status', 'franchise', NULL, NULL, NULL, NULL),
(29, 'create_franchise', 'franchise', NULL, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_hidden` tinyint(4) NOT NULL DEFAULT '0',
  `is_default` int(11) NOT NULL DEFAULT '0',
  `description` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `display_name`, `is_hidden`, `is_default`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'Administrator', 1, 1, 'User is allowed to manage and edit other users', '2019-01-24 00:52:17', '2019-01-30 00:46:58'),
(2, 'user', 'User', 0, 0, 'User is allowed to manage and edit other users', '2019-01-24 00:52:17', '2019-01-29 00:52:27'),
(12, 'Franchise', NULL, 0, 0, NULL, '2019-01-29 07:33:26', '2019-01-29 07:33:26'),
(13, 'harish', NULL, 0, 0, NULL, '2019-02-05 08:48:56', '2019-02-05 08:48:56');

-- --------------------------------------------------------

--
-- Table structure for table `stations`
--

CREATE TABLE `stations` (
  `id` int(11) NOT NULL,
  `station_id` varchar(100) NOT NULL,
  `created_by` varchar(100) NOT NULL,
  `created_by_id` varchar(110) NOT NULL,
  `station_name` varchar(100) NOT NULL,
  `status` varchar(100) NOT NULL DEFAULT 'active',
  `latitude` varchar(20) NOT NULL,
  `longitude` varchar(20) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `stations`
--

INSERT INTO `stations` (`id`, `station_id`, `created_by`, `created_by_id`, `station_name`, `status`, `latitude`, `longitude`, `created_at`, `updated_at`) VALUES
(1, 'EVM1234589', 'admin', '1', 'Panjagutta', 'banned', '17.426480', '78.450370', '2019-01-28 05:34:57', '2019-02-07 18:47:23'),
(2, 'EVM123457', 'admin', '12', 'Panjagutta circle', 'active', '17.425937', '78.450831', '2019-01-28 05:34:57', NULL),
(3, 'EVM123456', 'admin', '1', 'Panjagutta', 'active', '17.430688', '78.429436', '2019-01-28 05:34:57', NULL),
(4, 'EVM1234', 'admin', '1', 'inno', 'under_maintained', '17.442050', '78.396957', '2019-01-28 05:34:57', '2019-02-07 18:37:27'),
(6, 'EVM_I7PGV51YZC', 'admin', '12', 'hari', 'active', '17.418869', '78.403009', '2019-02-07 14:00:33', '2019-02-08 13:12:52'),
(7, 'EVM_6E7DHOMR3P', 'franchise', '1', 'Tankbund', 'active', '17.423455', '78.463240', '2019-02-08 06:22:30', '2019-02-08 11:52:47');

-- --------------------------------------------------------

--
-- Table structure for table `templates`
--

CREATE TABLE `templates` (
  `id` int(11) NOT NULL,
  `is_default` int(11) NOT NULL DEFAULT '0',
  `name` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
  `category` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `subject` text COLLATE utf8_unicode_ci,
  `body` text COLLATE utf8_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



--
-- Indexes for dumped tables
--

--
-- Indexes for table `activities`
--
ALTER TABLE `activities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `custom_fields`
--
ALTER TABLE `custom_fields`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `menus`
--
ALTER TABLE `menus`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_unique` (`name`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_unique` (`name`);

--
-- Indexes for table `stations`
--
ALTER TABLE `stations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `station_id` (`station_id`);

--
-- Indexes for table `templates`
--
ALTER TABLE `templates`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activities`
--
ALTER TABLE `activities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `custom_fields`
--
ALTER TABLE `custom_fields`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `menus`
--
ALTER TABLE `menus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `stations`
--
ALTER TABLE `stations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `templates`
--
ALTER TABLE `templates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
COMMIT;

