-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 19, 2022 at 09:35 AM
-- Server version: 5.7.33
-- PHP Version: 7.4.19

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!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 utf8mb4 */;

--
-- Database: `lara_inventory`
--

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

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `emp_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `emp_designation` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `emp_phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `emp_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `emp_address` text COLLATE utf8mb4_unicode_ci,
  `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 `employees`
--

INSERT INTO `employees` (`id`, `emp_name`, `emp_designation`, `emp_phone`, `emp_email`, `emp_address`, `created_at`, `updated_at`) VALUES
(1, 'Sample Employee', 'Nothing', '0000000000', 'sample@gmail.com', 'Please edit this default employee!!', '2020-06-29 00:33:58', '2020-06-29 00:33:58');

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

--
-- Table structure for table `master_settings`
--

CREATE TABLE `master_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `company_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company_phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company_website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company_address` text COLLATE utf8mb4_unicode_ci,
  `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `time_zone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_driver` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_host` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_port` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_username` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_password` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_encryption` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_from_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mail_from_name` varchar(191) 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 `master_settings`
--

INSERT INTO `master_settings` (`id`, `company_name`, `company_phone`, `company_email`, `company_website`, `company_address`, `logo`, `currency_symbol`, `time_zone`, `mail_driver`, `mail_host`, `mail_port`, `mail_username`, `mail_password`, `mail_encryption`, `mail_from_address`, `mail_from_name`, `created_at`, `updated_at`) VALUES
(1, 'Company Name', '00000000000', NULL, NULL, NULL, 'logo/logo.png', '$', 'Europe/London', 'smtp', 'smtp.mailtrap.io', '2525', 'bd0aba9599a01e', 'ba05d75b32646a', 'tls', 'norely@example.com', 'Example', '2020-06-29 00:33:58', '2020-06-29 00:33:58');

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

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

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_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),
(3, '2020_03_01_163245_create_employees_table', 1),
(4, '2020_04_25_034520_create_products_table', 1),
(5, '2020_04_25_052341_create_stock_ins_table', 1),
(6, '2020_04_25_134746_create_sales_invoices_table', 1),
(7, '2020_04_25_135925_create_sales_details_table', 1),
(8, '2020_04_25_165007_create_master_settings_table', 1),
(9, '2020_05_09_035257_create_timezones_table', 1),
(10, '2020_05_10_175509_create_statements_table', 1);

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

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

CREATE TABLE `password_resets` (
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `item_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `serial_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` double(15,2) NOT NULL,
  `qty` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_brand` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_model` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_color` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_fuel_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_trim` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_model_year` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_reg_year` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_reg_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_condition` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_transmission` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_body_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_engine_capacity` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `car_kilometers_run` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `item_name`, `serial_no`, `type`, `price`, `qty`, `description`, `car_brand`, `car_model`, `car_color`, `car_fuel_type`, `car_trim`, `car_model_year`, `car_reg_year`, `car_reg_number`, `car_condition`, `car_transmission`, `car_body_type`, `car_engine_capacity`, `car_kilometers_run`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '2007  NISSAN DUALIS', '12345', 'Cars', 3500.00, '10', '2007  Nissan Dualis', 'NISSAN', 'NJ10-081385', 'SILVER', NULL, NULL, '2007', NULL, NULL, 'New', NULL, 'SUV', '2000cc', '64,750 km', '2020-06-29 00:41:17', '2020-06-29 00:41:17', NULL),
(2, '2015 TOYOTA AQUA', '2222', 'Cars', 2800.00, '15', 'New car TOYOTA AQUA', 'TOYOTA', 'NHP10-6372522', 'White', NULL, NULL, '2015', NULL, NULL, 'New', NULL, 'Hatchback', NULL, NULL, '2020-06-29 00:43:32', '2020-06-29 00:43:32', NULL),
(3, '2017 SUBARU IMPREZA', '321', 'Cars', 3500.00, '4', 'New Car 2017 SUBARU IMPREZA', 'SUBARU', 'GT6-010107', 'Silver', NULL, NULL, '2017', NULL, NULL, 'New', NULL, NULL, NULL, NULL, '2020-06-29 00:45:14', '2020-06-29 00:56:56', NULL);

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

--
-- Table structure for table `sales_details`
--

CREATE TABLE `sales_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `inv_id` bigint(20) UNSIGNED NOT NULL,
  `sales_date` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `product_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_desc` text COLLATE utf8mb4_unicode_ci,
  `inv_no` bigint(20) NOT NULL,
  `price` double(15,2) NOT NULL,
  `qty` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total` double(15,2) NOT NULL,
  `note` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sold_by` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sold_by_id` bigint(20) UNSIGNED 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 `sales_details`
--

INSERT INTO `sales_details` (`id`, `inv_id`, `sales_date`, `product_id`, `product_name`, `product_desc`, `inv_no`, `price`, `qty`, `total`, `note`, `sold_by`, `sold_by_id`, `created_at`, `updated_at`) VALUES
(1, 1, '2020-06-29', 3, '2017 SUBARU IMPREZA', 'New Car 2017 SUBARU IMPREZA', 1000, 3500.00, '1', 3500.00, NULL, 'Sample Employee', 1, '2020-06-29 00:56:56', '2020-06-29 00:56:56');

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

--
-- Table structure for table `sales_invoices`
--

CREATE TABLE `sales_invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `inv_no` bigint(20) NOT NULL,
  `inv_title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sales_date` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `due_date` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `inv_type` int(11) DEFAULT NULL,
  `tracking_ref` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `consingee` text COLLATE utf8mb4_unicode_ci,
  `ship_to` text COLLATE utf8mb4_unicode_ci,
  `container_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lock_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tare` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `salesNote` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pay_on_to` text COLLATE utf8mb4_unicode_ci,
  `advice_to` text COLLATE utf8mb4_unicode_ci,
  `total_qty` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sub_total` double(15,2) NOT NULL,
  `dis_percent` double(15,2) DEFAULT NULL,
  `dis_amount` double(15,2) DEFAULT NULL,
  `tax_percent` double(15,2) DEFAULT NULL,
  `tax_amount` double(15,2) DEFAULT NULL,
  `totalAmount` double(15,2) NOT NULL,
  `user_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `packing_slip` int(11) DEFAULT NULL,
  `sold_by` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sold_by_id` bigint(20) UNSIGNED 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 `sales_invoices`
--

INSERT INTO `sales_invoices` (`id`, `inv_no`, `inv_title`, `sales_date`, `due_date`, `inv_type`, `tracking_ref`, `tax_no`, `consingee`, `ship_to`, `container_no`, `lock_no`, `tare`, `salesNote`, `pay_on_to`, `advice_to`, `total_qty`, `sub_total`, `dis_percent`, `dis_amount`, `tax_percent`, `tax_amount`, `totalAmount`, `user_name`, `packing_slip`, `sold_by`, `sold_by_id`, `created_at`, `updated_at`) VALUES
(1, 1000, 'Local Invoice', '2020-06-29', '2020-06-29', 2, '111', '121111111111', NULL, 'Test', NULL, NULL, NULL, NULL, '11111111111111111', 'test', '1', 3500.00, 0.00, 0.00, 0.00, 0.00, 3500.00, 'admin@gmail.com', NULL, 'Sample Employee', 1, '2020-06-29 00:56:56', '2020-06-29 00:56:56');

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

--
-- Table structure for table `statements`
--

CREATE TABLE `statements` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `s_date` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` double(15,2) NOT NULL DEFAULT '0.00',
  `description` text COLLATE utf8mb4_unicode_ci,
  `ref_file` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `action_by` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `action_by_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `stock_ins`
--

CREATE TABLE `stock_ins` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `stockin_date` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `qty` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchase_price` double(15,2) NOT NULL DEFAULT '0.00',
  `total` double(15,2) NOT NULL DEFAULT '0.00',
  `ref` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `stockin_by` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `stockin_by_id` bigint(20) UNSIGNED 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 `stock_ins`
--

INSERT INTO `stock_ins` (`id`, `product_id`, `stockin_date`, `qty`, `purchase_price`, `total`, `ref`, `user_name`, `stockin_by`, `stockin_by_id`, `created_at`, `updated_at`) VALUES
(1, 1, '2020-06-29', '10', 2000.00, 20000.00, '1111', 'admin@gmail.com', 'Sample Employee', 1, '2020-06-29 00:41:17', '2020-06-29 00:41:17'),
(2, 2, '2020-06-29', '15', 2200.00, 33000.00, '1111', 'admin@gmail.com', 'Sample Employee', 1, '2020-06-29 00:43:32', '2020-06-29 00:43:32'),
(3, 3, '2020-06-29', '5', 2500.00, 12500.00, '211', 'admin@gmail.com', 'Sample Employee', 1, '2020-06-29 00:45:14', '2020-06-29 00:45:14');

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

--
-- Table structure for table `timezones`
--

CREATE TABLE `timezones` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` varchar(191) COLLATE utf8mb4_unicode_ci 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 `timezones`
--

INSERT INTO `timezones` (`id`, `name`, `value`, `created_at`, `updated_at`) VALUES
(1, 'Europe/London (GMT)', 'Europe/London', '2020-06-29 00:33:58', '2020-06-29 00:33:58'),
(2, 'America/New_York (GMT-05:00)', 'America/New_York', '2020-06-29 00:33:58', '2020-06-29 00:33:58'),
(3, 'Pacific/Auckland (GMT+12:00)', 'Pacific/Auckland', '2020-06-29 00:33:58', '2020-06-29 00:33:58'),
(4, 'Asia/Dhaka (GMT+06:00)', 'Asia/Dhaka', '2020-06-29 00:33:58', '2020-06-29 00:33:58');

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

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

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) 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 `users`
--

INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin@gmail.com', NULL, '$2y$10$U6OfnTzwc5VhAfcFy.7qHu3hUilKozkquUhjj/MJLChYCtvqtdx5K', NULL, NULL, NULL);

--
-- Indexes for dumped tables
--

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

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

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

--
-- Indexes for table `sales_details`
--
ALTER TABLE `sales_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sales_details_inv_id_foreign` (`inv_id`),
  ADD KEY `sales_details_product_id_foreign` (`product_id`),
  ADD KEY `sales_details_sold_by_id_foreign` (`sold_by_id`);

--
-- Indexes for table `sales_invoices`
--
ALTER TABLE `sales_invoices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sales_invoices_sold_by_id_foreign` (`sold_by_id`);

--
-- Indexes for table `statements`
--
ALTER TABLE `statements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `statements_action_by_id_foreign` (`action_by_id`);

--
-- Indexes for table `stock_ins`
--
ALTER TABLE `stock_ins`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stock_ins_product_id_foreign` (`product_id`),
  ADD KEY `stock_ins_stockin_by_id_foreign` (`stockin_by_id`);

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `employees`
--
ALTER TABLE `employees`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `master_settings`
--
ALTER TABLE `master_settings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `sales_details`
--
ALTER TABLE `sales_details`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `sales_invoices`
--
ALTER TABLE `sales_invoices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `statements`
--
ALTER TABLE `statements`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stock_ins`
--
ALTER TABLE `stock_ins`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `timezones`
--
ALTER TABLE `timezones`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `sales_details`
--
ALTER TABLE `sales_details`
  ADD CONSTRAINT `sales_details_inv_id_foreign` FOREIGN KEY (`inv_id`) REFERENCES `sales_invoices` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sales_details_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sales_details_sold_by_id_foreign` FOREIGN KEY (`sold_by_id`) REFERENCES `employees` (`id`);

--
-- Constraints for table `sales_invoices`
--
ALTER TABLE `sales_invoices`
  ADD CONSTRAINT `sales_invoices_sold_by_id_foreign` FOREIGN KEY (`sold_by_id`) REFERENCES `employees` (`id`);

--
-- Constraints for table `statements`
--
ALTER TABLE `statements`
  ADD CONSTRAINT `statements_action_by_id_foreign` FOREIGN KEY (`action_by_id`) REFERENCES `employees` (`id`);

--
-- Constraints for table `stock_ins`
--
ALTER TABLE `stock_ins`
  ADD CONSTRAINT `stock_ins_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `stock_ins_stockin_by_id_foreign` FOREIGN KEY (`stockin_by_id`) REFERENCES `employees` (`id`);
COMMIT;

/*!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 */;
