-- 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 `franchises`
--

CREATE TABLE `franchises` (
  `id` int(11) NOT NULL,
  `franchaise_id` varchar(100) NOT NULL,
  `franchise_name` varchar(100) NOT NULL,
  `username` varchar(100) NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `last_name` varchar(100) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) NOT NULL,
  `status` varchar(10) NOT NULL,
  `latitude` varchar(100) NOT NULL,
  `longitude` varchar(100) NOT NULL,
  `database_name` varchar(100) NOT NULL,
  `password` varchar(150) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `franchises`
--

INSERT INTO `franchises` (`id`, `franchaise_id`, `franchise_name`, `username`, `first_name`, `last_name`, `phone`, `email`, `status`, `latitude`, `longitude`, `database_name`, `password`, `created_at`, `updated_at`) VALUES
(8, 'FRA_UQEZSB5C', 'Mehdipatnam', 'admin123', 'harish', 'reddy', NULL, 'eharishwarreddy666@gmail.com', 'banned', '17.393955', '78.435208', 'admin123', '$2y$10$u.8C8VzpKdI0M9/R7j/h/.B2RbvmWZ5xnhjUb3noZMoaEwgKQ/FFG', '2019-02-11 13:38:52', '2019-02-11 14:12:22');

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

--
-- 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 `profiles`
--

CREATE TABLE `profiles` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `gender` varchar(110) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` varchar(200) DEFAULT NULL,
  `city` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `country` int(11) DEFAULT NULL,
  `image` varchar(200) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `profiles`
--

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

--
-- 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,
  `city_id` int(11) NOT NULL COMMENT 'City id',
  `state_id` int(11) NOT NULL COMMENT 'state id',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

--
-- Table structure for table `s_m_t_p_s`
--

CREATE TABLE `s_m_t_p_s` (
  `id` int(10) UNSIGNED NOT NULL,
  `driver` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `host` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `port` int(11) NOT NULL,
  `from_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `from_address` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `encryption` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` smallint(6) NOT 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 `s_m_t_p_s`
--

INSERT INTO `s_m_t_p_s` (`id`, `driver`, `host`, `port`, `from_name`, `from_address`, `username`, `password`, `encryption`, `status`, `created_at`, `updated_at`) VALUES
(10, 'smtp', 'mail.innoappsindia.com', 26, 'admin@innoappsindia.com', 'admin@innoappsindia.com', 'admin@innoappsindia.com', 'Admin@189981', 'tls', 0, '2018-11-13 01:36:34', '2019-02-06 07:19:52');

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

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

--
-- Dumping data for table `templates`
--

INSERT INTO `templates` (`id`, `is_default`, `name`, `category`, `subject`, `body`, `created_at`, `updated_at`) VALUES
(4, 1, 'Welcome Email', 'welcome_email', 'Welcome Email', 'Dear <br>Name: [NAME]<br>Email :[EMAIL]<br>Password :[PASSWORD] <br>Username:[USERNAME]<br>', '2019-01-30 08:23:59', NULL),
(23, 0, 'password change Email', 'password_reset', 'Successfully Changed Password', '<p style=\"margin-left: 275px;\"><img src=\"http://innoappsindia.com/assets/images/logo3.png\" style=\"text-align: center; width: 25%; float: left;\" class=\"note-float-left\"></p><p style=\"margin-left: 250px;\"><br></p><p style=\"text-align: justify;\">Dear [NAME]</p><p style=\"text-align: justify;\">Your password has successfully changed</p>', '2019-02-01 11:27:05', '2019-02-01 11:39:37'),
(24, 0, 'Otp Mail', 'otp_email', 'Reset  Password', '<p style=\"margin-left: 275px;\"><img src=\"http://innoappsindia.com/assets/images/logo3.png\" style=\"text-align: center; width: 50%; float: left;\" class=\"note-float-left\"></p><p style=\"margin-left: 250px;\"><br></p><p style=\"text-align: justify;\"><br></p><p style=\"text-align: justify;\">Dear [NAME]</p><p style=\"text-align: justify;\">Please Use This otp to reset Your password <b>[OTP]</b></p>', '2019-02-01 11:27:05', '2019-02-05 07:29:47');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(10) UNSIGNED NOT NULL,
  `username` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `mobile` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `database_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_hidden` int(4) NOT NULL DEFAULT '0',
  `designation_id` int(4) DEFAULT NULL,
  `role` int(4) DEFAULT NULL,
  `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `email_verified_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `password` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `remember_token` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `last_login_ip_now` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_login_now` timestamp NULL DEFAULT NULL,
  `last_login_ip` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_login` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `first_name`, `last_name`, `email`, `mobile`, `database_name`, `is_hidden`, `designation_id`, `role`, `status`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`, `last_login_ip_now`, `last_login_now`, `last_login_ip`, `last_login`) VALUES
(1, 'Admin', 'Admin', 'Admin', 'admin@gmail.com', '9533402327', 'admin123', 1, NULL, 1, 'active', '2019-01-23 18:30:00', '$2y$10$FKfh.vb0x/f/fScsvmvka.mY3Gx4M.i88q9GUXwFPJeDm0gCIwjjO', '44EIopI5kwdSx270xiJEmoz4khqHEBaKHfp6QrmdEt4uqKKLDZtS31oGAVjf', '2019-01-23 22:53:24', '2019-02-11 05:31:16', '192.168.100.171', '2019-02-11 05:31:16', '::1', '2019-02-11 05:17:16');

--
-- 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 `franchises`
--
ALTER TABLE `franchises`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `id` (`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 `profiles`
--
ALTER TABLE `profiles`
  ADD UNIQUE KEY `id` (`id`);

--
-- 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 `s_m_t_p_s`
--
ALTER TABLE `s_m_t_p_s`
  ADD PRIMARY KEY (`id`);

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

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD UNIQUE KEY `username` (`username`);

--
-- 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 `franchises`
--
ALTER TABLE `franchises`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- 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 `profiles`
--
ALTER TABLE `profiles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;

--
-- 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 `s_m_t_p_s`
--
ALTER TABLE `s_m_t_p_s`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

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

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
COMMIT;

