-- http://www.phpmyadmin.net
--




--
-- Database: `payroll`
--

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

--
-- Table structure for table `attendence`
--

CREATE TABLE `attendence` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `company_id` int(10) UNSIGNED NOT NULL,
  `work_date` date NOT NULL,
  `time_in` time NOT NULL,
  `time_out` time NOT NULL,
  `overtime_in` time NOT NULL,
  `overtime_out` time NOT NULL,
  `shift` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `scheduled` tinyint(1) NOT NULL,
  `attendence` tinyint(4) NOT NULL DEFAULT '0',
  `time_sheet_by_company` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `attendence`
--

INSERT INTO `attendence` (`id`, `user_id`, `company_id`, `work_date`, `time_in`, `time_out`, `overtime_in`, `overtime_out`, `shift`, `scheduled`, `attendence`, `time_sheet_by_company`, `created_at`, `updated_at`) VALUES
(1, 10, 2, '2017-03-30', '00:00:00', '00:00:00', '00:00:00', '00:00:00', 'DAY', 1, 1, '0.00', '2017-03-30 02:30:00', '2017-03-30 02:30:00'),
(2, 10, 2, '2017-04-04', '04:00:00', '08:00:00', '00:00:00', '00:00:00', 'AFTERNOON', 0, 0, '0.00', NULL, NULL),
(3, 12, 3, '2017-04-03', '07:57:00', '04:30:00', '04:30:00', '06:30:00', 'NIGHT', 0, 0, '0.00', NULL, NULL),
(4, 10, 2, '2017-04-10', '10:00:00', '16:30:00', '18:00:00', '20:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(5, 10, 2, '2017-04-11', '10:00:00', '18:00:00', '18:00:00', '20:00:00', 'AFTERNOON', 1, 1, '0.00', NULL, NULL),
(7, 10, 3, '2017-04-12', '08:00:00', '16:00:00', '20:00:00', '22:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(8, 12, 2, '2017-04-10', '09:00:00', '18:00:00', '00:00:00', '00:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(9, 12, 3, '2017-04-11', '09:00:00', '18:00:00', '21:00:00', '23:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(10, 10, 2, '2017-04-13', '00:00:00', '00:00:00', '00:00:00', '00:00:00', 'DAY', 1, 0, '0.00', NULL, NULL),
(11, 10, 2, '2017-04-17', '08:00:00', '18:00:00', '00:00:00', '00:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(12, 10, 2, '2017-04-18', '08:00:00', '21:00:00', '00:00:00', '00:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(13, 10, 2, '2017-04-19', '08:00:00', '19:00:00', '00:00:00', '00:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(14, 10, 2, '2017-04-20', '08:00:00', '21:00:00', '00:00:00', '00:00:00', 'DAY', 1, 1, '0.00', NULL, NULL),
(15, 10, 2, '2017-04-21', '08:00:00', '19:00:00', '00:00:00', '00:00:00', 'DAY', 1, 1, '0.00', NULL, NULL);

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

--
-- Table structure for table `companies`
--

CREATE TABLE `companies` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `overtime` tinyint(1) NOT NULL DEFAULT '0',
  `shifts` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `workers_ordered` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `companies`
--

INSERT INTO `companies` (`id`, `name`, `email`, `overtime`, `shifts`, `workers_ordered`, `created_at`, `updated_at`) VALUES
(2, 'ABC Pvt. Ltd.', 'abc@abc.com', 1, '', 0, NULL, NULL),
(3, 'Demo Company Pvt. Ltd.', 'demo@demo.com', 0, '', 0, NULL, NULL),
(4, 'New test1', 'newtest1@test.com', 1, '["day","night"]', 5, '2017-05-17 09:23:04', '2017-05-18 03:06:06');

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

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Deduction for Ride', NULL, NULL),
(2, 'Deduction Security & Others', NULL, NULL);

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(4, '2017_03_24_062312_entrust_setup_tables', 2),
(6, '2017_03_29_063724_create_companies_table', 3),
(7, '2017_03_29_094334_create_attendence_table', 4),
(8, '2017_04_07_091340_create_payroll_table', 5),
(9, '2017_04_22_040112_create_expenses_table', 6),
(10, '2017_04_25_060130_create_payroll_attendences_table', 7),
(11, '2017_04_25_074337_create_payroll_table', 8),
(12, '2017_04_25_080807_create_payroll_attendences_table', 9),
(13, '2017_04_26_063316_create_payroll_company_table', 10),
(14, '2017_04_26_063508_create_payroll_attendence_table', 11),
(15, '2017_04_26_064249_create_payroll_attendence_company_table', 12),
(16, '2017_05_04_050935_create_payroll_expenses_table', 13);

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

--
-- Table structure for table `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `payroll`
--

CREATE TABLE `payroll` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `regular_hours` decimal(10,2) NOT NULL,
  `total_hours_worked` decimal(10,2) NOT NULL,
  `overtime_hours` decimal(10,2) NOT NULL,
  `regular_wages` decimal(10,2) NOT NULL,
  `overtime_wages` decimal(10,2) NOT NULL,
  `gross_wages` decimal(10,2) NOT NULL,
  `net_payable_wages` decimal(10,2) NOT NULL,
  `payment_status` tinyint(1) NOT NULL DEFAULT '0',
  `payment_mode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `payment_by_cheque` decimal(10,2) NOT NULL,
  `payment_by_cash` decimal(10,2) NOT NULL,
  `deductions` text COLLATE utf8_unicode_ci,
  `other_expenses` text COLLATE utf8_unicode_ci,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `payroll`
--

INSERT INTO `payroll` (`id`, `user_id`, `regular_hours`, `total_hours_worked`, `overtime_hours`, `regular_wages`, `overtime_wages`, `gross_wages`, `net_payable_wages`, `payment_status`, `payment_mode`, `payment_by_cheque`, `payment_by_cash`, `deductions`, `other_expenses`, `start_date`, `end_date`, `created_at`, `updated_at`) VALUES
(10, 10, '44.00', '22.50', '-21.50', '270.00', '-365.50', '-95.50', '-146.75', 0, NULL, '1.00', '1.00', '', '51.25', '2017-04-10', '2017-04-16', NULL, NULL),
(11, 12, '44.00', '18.00', '-26.00', '198.00', '-429.00', '-231.00', '0.00', 0, NULL, '0.00', '0.00', '', '', '2017-04-10', '2017-04-16', NULL, NULL),
(12, 10, '44.00', '58.00', '14.00', '528.00', '238.00', '290.00', '0.00', 0, NULL, '0.00', '0.00', '', '', '2017-04-17', '2017-04-23', NULL, NULL);

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

--
-- Table structure for table `payroll_attendence`
--

CREATE TABLE `payroll_attendence` (
  `id` int(10) UNSIGNED NOT NULL,
  `payroll_id` int(10) UNSIGNED NOT NULL,
  `attendence_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `payroll_attendence`
--

INSERT INTO `payroll_attendence` (`id`, `payroll_id`, `attendence_id`, `created_at`, `updated_at`) VALUES
(6, 10, 4, '2017-04-26 01:20:04', '2017-04-26 01:20:04'),
(7, 10, 5, '2017-04-26 01:20:04', '2017-04-26 01:20:04'),
(8, 10, 7, '2017-04-26 01:20:04', '2017-04-26 01:20:04'),
(11, 11, 4, '2017-04-27 01:35:48', '2017-04-27 01:35:48'),
(12, 11, 5, '2017-04-27 01:35:48', '2017-04-27 01:35:48'),
(13, 11, 7, '2017-04-27 01:35:48', '2017-04-27 01:35:48'),
(14, 12, 11, '2017-04-27 04:06:30', '2017-04-27 04:06:30'),
(15, 12, 12, '2017-04-27 04:06:30', '2017-04-27 04:06:30'),
(16, 12, 13, '2017-04-27 04:06:30', '2017-04-27 04:06:30'),
(17, 12, 14, '2017-04-27 04:06:30', '2017-04-27 04:06:30'),
(18, 12, 15, '2017-04-27 04:06:30', '2017-04-27 04:06:30');

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

--
-- Table structure for table `payroll_attendence_company`
--

CREATE TABLE `payroll_attendence_company` (
  `id` int(10) UNSIGNED NOT NULL,
  `payroll_id` int(10) UNSIGNED NOT NULL,
  `attendence_id` int(10) UNSIGNED NOT NULL,
  `company_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `payroll_company`
--

CREATE TABLE `payroll_company` (
  `id` int(10) UNSIGNED NOT NULL,
  `payroll_id` int(10) UNSIGNED NOT NULL,
  `company_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `payroll_company`
--

INSERT INTO `payroll_company` (`id`, `payroll_id`, `company_id`, `created_at`, `updated_at`) VALUES
(6, 10, 2, '2017-04-26 01:20:04', '2017-04-26 01:20:04'),
(7, 10, 3, '2017-04-26 01:20:04', '2017-04-26 01:20:04'),
(8, 11, 2, '2017-04-26 01:20:05', '2017-04-26 01:20:05'),
(9, 11, 3, '2017-04-26 01:20:05', '2017-04-26 01:20:05'),
(10, 12, 2, '2017-04-27 04:06:30', '2017-04-27 04:06:30');

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

--
-- Table structure for table `payroll_expenses`
--

CREATE TABLE `payroll_expenses` (
  `id` int(10) UNSIGNED NOT NULL,
  `payroll_id` int(10) UNSIGNED NOT NULL,
  `meta_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `meta_value` decimal(10,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `payroll_expenses`
--

INSERT INTO `payroll_expenses` (`id`, `payroll_id`, `meta_key`, `meta_value`, `created_at`, `updated_at`) VALUES
(1, 10, 'test1', '11.55', NULL, NULL),
(2, 10, 'test2', '12.45', NULL, NULL),
(3, 10, 'test3', '13.00', NULL, NULL),
(4, 10, 'test4', '14.25', NULL, NULL);

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

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

CREATE TABLE `permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `display_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

INSERT INTO `permissions` (`id`, `name`, `display_name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'user-view', 'View User List', NULL, NULL, NULL),
(2, 'user-create', 'Create New User', NULL, NULL, NULL),
(3, 'user-edit', 'Edit User', NULL, NULL, NULL),
(4, 'user-delete', 'Delete User', NULL, NULL, NULL),
(5, 'permission-view', 'View Permissions', NULL, NULL, NULL),
(6, 'permission-create', 'Create New Permission', NULL, NULL, NULL),
(7, 'permission-edit', 'Edit Permission', NULL, NULL, NULL),
(8, 'permission-delete', 'Delete Permission', NULL, NULL, NULL),
(9, 'role-view', 'View Roles', NULL, NULL, NULL),
(10, 'role-create', 'Create New Role', NULL, NULL, NULL),
(11, 'role-edit', 'Edit Role', NULL, NULL, NULL),
(12, 'role-delete', 'Delete Role', NULL, NULL, NULL),
(13, 'company-view', 'View Companies', NULL, '2017-03-29 08:53:25', '2017-03-29 08:53:25'),
(14, 'company-create', 'Create New Company', NULL, '2017-03-29 08:53:41', '2017-03-29 08:53:41'),
(15, 'company-edit', 'Edit Company', NULL, '2017-03-29 08:53:56', '2017-03-29 08:53:56'),
(16, 'company-delete', 'Delete Company', NULL, '2017-03-29 08:54:22', '2017-03-29 08:54:22'),
(17, 'attendence-view', 'View Attendences', NULL, '2017-03-29 08:54:46', '2017-03-29 08:54:46'),
(18, 'attendence-create', 'Add New Attendence', NULL, '2017-03-29 08:55:07', '2017-03-29 08:55:07'),
(19, 'attendence-edit', 'Update Attendence', NULL, '2017-03-29 08:55:26', '2017-03-29 08:55:26'),
(20, 'attendence-delete', 'Delete Attendence', NULL, '2017-03-29 08:55:47', '2017-03-29 08:55:47'),
(21, 'worker-view', 'View Workers List', NULL, '2017-04-06 00:44:33', '2017-04-06 00:44:33'),
(22, 'worker-create', 'Create New Worker', NULL, '2017-04-06 00:44:49', '2017-04-06 00:44:49'),
(23, 'worker-edit', 'Edit Worker', NULL, '2017-04-06 00:45:06', '2017-04-06 00:45:06'),
(24, 'worker-delete', 'Delete Worker', NULL, '2017-04-06 00:45:22', '2017-04-06 00:45:22'),
(25, 'payroll-view', 'View Payroll List', NULL, '2017-04-13 03:03:48', '2017-04-13 03:03:48'),
(26, 'payroll-create', 'Create Payroll', NULL, '2017-04-13 03:04:03', '2017-04-13 03:04:03'),
(27, 'payroll-edit', 'Edit Payroll', NULL, '2017-04-13 03:04:19', '2017-04-13 03:04:19'),
(28, 'payroll-delete', 'Delete Payroll', NULL, '2017-04-13 03:04:34', '2017-04-13 03:04:34'),
(29, 'expense-view', 'View Expenses List', NULL, '2017-04-21 22:47:52', '2017-04-21 22:47:52'),
(30, 'expense-create', 'Create New Expense', NULL, '2017-04-21 22:48:07', '2017-04-21 22:48:07'),
(31, 'expense-edit', 'Update Expense', NULL, '2017-04-21 22:48:22', '2017-04-21 22:48:22'),
(32, 'expense-delete', 'Delete Expense', NULL, '2017-04-21 22:48:37', '2017-04-21 22:48:37');

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

--
-- Table structure for table `permission_role`
--

CREATE TABLE `permission_role` (
  `permission_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `permission_role`
--

INSERT INTO `permission_role` (`permission_id`, `role_id`) VALUES
(1, 1),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(22, 1),
(23, 1),
(24, 1),
(25, 1),
(26, 1),
(27, 1),
(28, 1),
(29, 1),
(30, 1),
(31, 1),
(32, 1);

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

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

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `display_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

INSERT INTO `roles` (`id`, `name`, `display_name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Admin', NULL, NULL, NULL),
(2, 'worker', 'Worker', NULL, NULL, '2017-04-04 02:03:22'),
(3, 'staff', 'Staff', NULL, '2017-05-15 09:16:37', '2017-05-15 09:16:37');

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

--
-- Table structure for table `role_user`
--

CREATE TABLE `role_user` (
  `user_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `role_user`
--

INSERT INTO `role_user` (`user_id`, `role_id`) VALUES
(1, 1),
(10, 2),
(12, 2),
(13, 2),
(14, 3),
(15, 2),
(16, 2),
(17, 2),
(18, 2);

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

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

CREATE TABLE `users` (
  `id` int(10) UNSIGNED NOT NULL,
  `emp_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `middle_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `regular_hourly_rate` decimal(10,2) NOT NULL,
  `overtime_hourly_rate` decimal(10,2) NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `alternate_phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `avatar_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `dnr_notes` text COLLATE utf8_unicode_ci NOT NULL,
  `overtime_allowed` tinyint(1) NOT NULL DEFAULT '0',
  `rate_factor` decimal(10,2) NOT NULL DEFAULT '0.00',
  `company_assigned` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

INSERT INTO `users` (`id`, `emp_id`, `first_name`, `middle_name`, `last_name`, `username`, `email`, `regular_hourly_rate`, `overtime_hourly_rate`, `password`, `phone`, `alternate_phone`, `avatar`, `avatar_path`, `remember_token`, `status`, `dnr_notes`, `overtime_allowed`, `rate_factor`, `company_assigned`, `created_at`, `updated_at`) VALUES
(1, 'Staff-01', 'Pardeep', '', 'Sharma', 'admin', 'pardeepsh.mca@gmail.com', '0.00', '0.00', '$2y$10$LIDTFiUGh81uWnzsQ6707uJRXA4s15slQ9PKHd7v0p7j88MV.kxf.', '1234567890', '', 'user.png', 'uploads/avatar/user.png', 'GGnbFgUPBgiVEll0F8f7KC8q3POiEM1v75mCFRgxg4L0mKRlPOJuHhgE4o9z', '', '', 0, '0.00', 0, '2017-03-23 23:30:00', '2017-03-28 05:35:55'),
(10, 'ML-01', 'Employee', '', 'Name1', 'emp1', 'emp1@payroll.dev', '12.00', '17.00', '$2y$10$hCnenM62pIsPZ1WkuCQx/ePPZ2ZEL1X3jCz0LHfgzUxiHcUCT0apa', '1234567890', '', '1490623242.jpg', 'uploads/avatar/1490623242.jpg', NULL, 'active', '', 0, '0.00', 4, '2017-03-27 08:30:42', '2017-05-19 04:43:12'),
(12, 'ML-02', 'New', '', 'Test2', 'newtest2', 'newtest2@test.com', '11.00', '16.50', '$2y$10$C0pw3HI3u8NuQPVHshvEiOpmeTMlq3qPN25aKjTL/ErPpzyXdGzPG', '1234567890', '', 'user.png', 'uploads/avatar/user.png', NULL, 'active', '', 0, '0.00', 4, '2017-04-06 00:26:58', '2017-05-19 04:46:53'),
(13, 'ML-03', 'New', '', 'Worker4', 'newworker4', 'newworker4@test.com', '10.40', '11.30', '$2y$10$naOydsjYrxLDG5P6NakG8.Y5zmZQ6EqZdDcAK.icNeCsVSPfhnXD2', '1234567890', '', 'user.png', 'uploads/avatar/user.png', NULL, 'active', '', 0, '0.00', 4, '2017-05-04 00:01:26', '2017-05-19 04:47:03'),
(14, 'Staff-02', 'New', '', 'Staff1', 'staff01', 'staff01@test.com', '0.00', '0.00', '$2y$10$Fuu/rcBGyqQl7Sf9A/57DeeX9qE7dvygaTy/JQrPv9W/TcxoNSI66', '1234567890', '', 'user.png', 'uploads/avatar/user.png', NULL, '', '', 0, '0.00', 0, '2017-05-15 10:45:54', '2017-05-15 10:45:54'),
(15, 'ML-04', 'New', '4', 'Employee', 'worker-aR3vQU0EHtYqmKz9jHMV', 'newemp4@test.com', '11.00', '16.50', '$2y$10$.peY9ChwMNtA0gnBruekLuGrqfFMc/eIy0MwEQNONzcoG9heMTPtG', '1234567890', '', '1495011255.png', 'uploads/avatar/1495011255.png', NULL, '', '', 0, '0.00', 0, '2017-05-17 03:24:15', '2017-05-17 03:24:15'),
(16, 'ML-05', 'New', '5', 'Employee', 'worker-9inGMzj2r5rBVD50HW9T', 'newemp5@test.com', '10.00', '15.00', '$2y$10$bQ/SiHFKgTpemQYYKQdEre.jdX6qhUAwoalaCPuKA/nZyiQPWxlfS', '1234567890', '', 'user.png', 'uploads/avatar/user.png', NULL, '', '', 0, '0.00', 0, '2017-05-17 03:32:30', '2017-05-17 03:32:30'),
(17, 'ML-06', 'New', '6', 'Employee', 'worker-gIuk1O4n3w8WKw3m1twm', 'newemp6@test.com', '9.00', '0.00', '$2y$10$zuRFRNSK/kC1BP4q1JItZeTCEYsr44Cr9IGDKpfqlr33hWRJtRySy', '1234567890', '123456', 'user.png', 'uploads/avatar/user.png', NULL, 'dnr', '', 0, '0.00', 3, '2017-05-17 04:20:33', '2017-05-17 04:20:33'),
(18, 'ML-07', 'New', '4', 'Employee', 'worker-2SygTWFWHUlKAUYWmmt8', 'pinkal.sfc@gmail.com', '10.00', '12.00', '$2y$10$R.Af6SrfTVfJc6Eq1LH/qOUVMSZ7lsvKuerfM2hH3pcxChnLMnCHK', '1234567890', '123456', 'user.png', 'uploads/avatar/user.png', NULL, 'dnr', 'Test DNR Notes', 1, '1.20', 2, '2017-05-17 04:43:27', '2017-05-17 05:04:56');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `attendence`
--
ALTER TABLE `attendence`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attendence_user_id_index` (`user_id`),
  ADD KEY `attendence_company_id_index` (`company_id`);

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

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

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

--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

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

--
-- Indexes for table `payroll_attendence`
--
ALTER TABLE `payroll_attendence`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payroll_attendence_payroll_id_foreign` (`payroll_id`),
  ADD KEY `payroll_attendence_attendence_id_foreign` (`attendence_id`);

--
-- Indexes for table `payroll_attendence_company`
--
ALTER TABLE `payroll_attendence_company`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payroll_attendence_company_payroll_id_foreign` (`payroll_id`),
  ADD KEY `payroll_attendence_company_attendence_id_foreign` (`attendence_id`),
  ADD KEY `payroll_attendence_company_company_id_foreign` (`company_id`);

--
-- Indexes for table `payroll_company`
--
ALTER TABLE `payroll_company`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payroll_company_payroll_id_foreign` (`payroll_id`),
  ADD KEY `payroll_company_company_id_foreign` (`company_id`);

--
-- Indexes for table `payroll_expenses`
--
ALTER TABLE `payroll_expenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payroll_expenses_payroll_id_foreign` (`payroll_id`);

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

--
-- Indexes for table `permission_role`
--
ALTER TABLE `permission_role`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `permission_role_role_id_foreign` (`role_id`);

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

--
-- Indexes for table `role_user`
--
ALTER TABLE `role_user`
  ADD PRIMARY KEY (`user_id`,`role_id`),
  ADD KEY `role_user_role_id_foreign` (`role_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `attendence`
--
ALTER TABLE `attendence`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `companies`
--
ALTER TABLE `companies`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `payroll`
--
ALTER TABLE `payroll`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `payroll_attendence`
--
ALTER TABLE `payroll_attendence`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `payroll_attendence_company`
--
ALTER TABLE `payroll_attendence_company`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `payroll_company`
--
ALTER TABLE `payroll_company`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `payroll_expenses`
--
ALTER TABLE `payroll_expenses`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `attendence`
--
ALTER TABLE `attendence`
  ADD CONSTRAINT `attendence_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `attendence_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `payroll`
--
ALTER TABLE `payroll`
  ADD CONSTRAINT `payroll_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `payroll_attendence`
--
ALTER TABLE `payroll_attendence`
  ADD CONSTRAINT `payroll_attendence_attendence_id_foreign` FOREIGN KEY (`attendence_id`) REFERENCES `attendence` (`id`),
  ADD CONSTRAINT `payroll_attendence_payroll_id_foreign` FOREIGN KEY (`payroll_id`) REFERENCES `payroll` (`id`);

--
-- Constraints for table `payroll_attendence_company`
--
ALTER TABLE `payroll_attendence_company`
  ADD CONSTRAINT `payroll_attendence_company_attendence_id_foreign` FOREIGN KEY (`attendence_id`) REFERENCES `attendence` (`id`),
  ADD CONSTRAINT `payroll_attendence_company_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`),
  ADD CONSTRAINT `payroll_attendence_company_payroll_id_foreign` FOREIGN KEY (`payroll_id`) REFERENCES `payroll` (`id`);

--
-- Constraints for table `payroll_company`
--
ALTER TABLE `payroll_company`
  ADD CONSTRAINT `payroll_company_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`),
  ADD CONSTRAINT `payroll_company_payroll_id_foreign` FOREIGN KEY (`payroll_id`) REFERENCES `payroll` (`id`);

--
-- Constraints for table `payroll_expenses`
--
ALTER TABLE `payroll_expenses`
  ADD CONSTRAINT `payroll_expenses_payroll_id_foreign` FOREIGN KEY (`payroll_id`) REFERENCES `payroll` (`id`);

--
-- Constraints for table `permission_role`
--
ALTER TABLE `permission_role`
  ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `role_user`
--
ALTER TABLE `role_user`
  ADD CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

