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

START TRANSACTION;



--
-- Database: `laravel_aus`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`mahabubenterpris`@`localhost` PROCEDURE `CalculateDailyClosingBalance` ()   BEGIN
    -- Initialize the balance variable
    SET @balance := 0;

    -- Drop any existing temporary tables to avoid conflicts
    DROP TEMPORARY TABLE IF EXISTS date_range, cash_in, cash_out, cash_spent, daily_balance;

    -- Create the cash_in temporary table
    CREATE TEMPORARY TABLE cash_in AS
    SELECT payment_date AS trans_date, SUM(paid) AS cash_in
    FROM receive_payments
    WHERE payment_method_id = 1
    GROUP BY payment_date;

    -- Create the cash_out temporary table
    CREATE TEMPORARY TABLE cash_out AS
    SELECT payment_date AS trans_date, SUM(paid) AS cash_out
    FROM payments
    WHERE payment_method_id = 1
    GROUP BY payment_date;

    -- Create the cash_spent temporary table
    CREATE TEMPORARY TABLE cash_spent AS
    SELECT entry_date AS trans_date, SUM(total) AS cash_spent
    FROM expenses
    GROUP BY entry_date;

    -- Create the daily_balance temporary table
    CREATE TEMPORARY TABLE daily_balance AS
    SELECT
        dr.report_date,
        COALESCE(ci.cash_in, 0) AS cash_in,
        COALESCE(co.cash_out, 0) AS cash_out,
        COALESCE(cs.cash_spent, 0) AS cash_spent
    FROM date_range dr
    LEFT JOIN cash_in ci ON dr.report_date = ci.trans_date
    LEFT JOIN cash_out co ON dr.report_date = co.trans_date
    LEFT JOIN cash_spent cs ON dr.report_date = cs.trans_date;

    -- Final select to calculate the cumulative balance
    SELECT
        report_date,
        cash_in,
        cash_out,
        cash_spent,
        @balance := @balance + cash_in - cash_out - cash_spent AS closing_balance
    FROM daily_balance
    ORDER BY report_date;

    -- Drop temporary tables to clean up
    DROP TEMPORARY TABLE IF EXISTS date_range, cash_in, cash_out, cash_spent, daily_balance;

END$$

DELIMITER ;

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

--
-- Table structure for table `accounts`
--

CREATE TABLE `accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(10) NOT NULL,
  `account_no` text DEFAULT NULL,
  `bank_or_mobile_wallet_id` varchar(191) 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 `accounts`
--

INSERT INTO `accounts` (`id`, `type`, `account_no`, `bank_or_mobile_wallet_id`, `created_at`, `updated_at`) VALUES
(5, 'bank', 'c123', '3', '2024-06-22 12:00:43', '2024-06-22 12:00:43'),
(6, 'bank', '1235', '3', '2024-06-22 12:01:23', '2024-06-22 12:01:23'),
(7, 'mobile', '01737552055', '7', '2024-06-22 15:34:01', '2024-06-22 15:34:01'),
(8, 'mobile', '01913831138', '7', '2024-06-22 15:34:22', '2024-06-22 15:34:22'),
(9, 'mobile', '01715831135', '8', '2024-06-22 15:34:46', '2024-06-22 15:34:46'),
(12, 'bank', 'd123', '2', '2024-07-05 10:49:23', '2024-07-05 10:49:23'),
(13, 'bank', 'd235', '2', '2024-07-05 10:49:37', '2024-07-05 10:49:37'),
(14, 'mobile', '01737552055', '16', '2024-07-05 10:49:59', '2024-07-05 10:49:59'),
(15, 'mobile', '01915325', '17', '2024-07-05 10:50:10', '2024-07-05 10:50:10');

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

--
-- Table structure for table `activity_logs`
--

CREATE TABLE `activity_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `stock_id` int(11) DEFAULT NULL,
  `part_name` varchar(255) DEFAULT NULL,
  `part_no` varchar(255) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `action` varchar(100) 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 `activity_logs`
--

INSERT INTO `activity_logs` (`id`, `user_id`, `product_id`, `stock_id`, `part_name`, `part_no`, `quantity`, `action`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, NULL, NULL, NULL, NULL, 'Create new production unit ', '2025-01-12 07:43:14', '2025-01-12 07:43:14', NULL),
(2, 1, 89, NULL, NULL, NULL, NULL, 'Delete user', '2025-01-12 07:45:29', '2025-01-12 07:45:29', NULL),
(3, 1, 76, NULL, NULL, NULL, NULL, 'Delete user', '2025-01-12 07:45:43', '2025-01-12 07:45:43', NULL),
(4, 1, 3, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:16:53', '2025-01-14 08:16:53', NULL),
(5, 1, 3, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:17:10', '2025-01-14 08:17:10', NULL),
(6, 1, 5, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:17:26', '2025-01-14 08:17:26', NULL),
(7, 1, 6, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:17:31', '2025-01-14 08:17:31', NULL),
(8, 1, 7, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:17:36', '2025-01-14 08:17:36', NULL),
(9, 1, 8, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:17:41', '2025-01-14 08:17:41', NULL),
(10, 1, 9, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:17:46', '2025-01-14 08:17:46', NULL),
(11, 1, 14, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:18:00', '2025-01-14 08:18:00', NULL),
(12, 1, 13, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:18:04', '2025-01-14 08:18:04', NULL),
(13, 1, 11, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 08:18:10', '2025-01-14 08:18:10', NULL),
(14, 1, 1, NULL, NULL, NULL, NULL, 'Bulk Delete stock', '2025-01-14 08:19:05', '2025-01-14 08:19:05', NULL),
(15, 1, 1, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:30:04', '2025-01-14 11:30:04', NULL),
(16, 1, 2, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:40:49', '2025-01-14 11:40:49', NULL),
(17, 1, 3, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:44:13', '2025-01-14 11:44:13', NULL),
(18, 1, 4, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:44:45', '2025-01-14 11:44:45', NULL),
(19, 1, 5, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:46:09', '2025-01-14 11:46:09', NULL),
(20, 1, 6, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:47:41', '2025-01-14 11:47:41', NULL),
(21, 1, 7, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:55:34', '2025-01-14 11:55:34', NULL),
(22, 1, 8, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 11:56:13', '2025-01-14 11:56:13', NULL),
(23, 1, 9, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 12:05:03', '2025-01-14 12:05:03', NULL),
(24, 1, 10, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 12:06:43', '2025-01-14 12:06:43', NULL),
(25, 1, 11, NULL, NULL, NULL, NULL, 'Create new product ', '2025-01-14 12:07:42', '2025-01-14 12:07:42', NULL),
(26, 1, 1, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:20:32', '2025-01-14 12:20:32', NULL),
(27, 1, 2, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:23:25', '2025-01-14 12:23:25', NULL),
(28, 1, 3, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:24:01', '2025-01-14 12:24:01', NULL),
(29, 1, 4, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:24:21', '2025-01-14 12:24:21', NULL),
(30, 1, 5, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:24:52', '2025-01-14 12:24:52', NULL),
(31, 1, 6, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:25:12', '2025-01-14 12:25:12', NULL),
(32, 1, 7, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:25:27', '2025-01-14 12:25:27', NULL),
(33, 1, 8, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:25:43', '2025-01-14 12:25:43', NULL),
(34, 1, 9, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:25:56', '2025-01-14 12:25:56', NULL),
(35, 1, 10, NULL, NULL, NULL, NULL, 'Create new raw material ', '2025-01-14 12:26:11', '2025-01-14 12:26:11', NULL),
(36, 1, 1, NULL, NULL, NULL, NULL, 'Delete stock', '2025-01-14 12:36:15', '2025-01-14 12:36:15', NULL),
(37, 1, 1, NULL, NULL, NULL, NULL, 'Delete order', '2025-01-14 12:38:16', '2025-01-14 12:38:16', NULL),
(38, 1, 2, NULL, NULL, NULL, NULL, 'Create new stock ', '2025-01-14 12:45:03', '2025-01-14 12:45:03', NULL),
(39, 1, 16, NULL, NULL, NULL, NULL, 'Create new stock ', '2025-01-26 10:36:19', '2025-01-26 10:36:19', NULL),
(40, 1, 17, NULL, NULL, NULL, NULL, 'Create new stock ', '2025-01-26 10:36:19', '2025-01-26 10:36:19', NULL),
(41, 1, 18, NULL, NULL, NULL, NULL, 'Create new stock ', '2025-01-26 10:37:20', '2025-01-26 10:37:20', NULL);

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

--
-- Table structure for table `banks_or_mobiles`
--

CREATE TABLE `banks_or_mobiles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `shop_id` int(11) NOT NULL,
  `name` text DEFAULT NULL,
  `type` varchar(191) 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 `banks_or_mobiles`
--

INSERT INTO `banks_or_mobiles` (`id`, `shop_id`, `name`, `type`, `created_at`, `updated_at`) VALUES
(2, 0, 'Dutch Bangla Bank Ltd.', 'bank', '0000-00-00 00:00:00', '2023-04-01 03:07:06'),
(3, 0, 'City Bank Ltd.', 'bank', '0000-00-00 00:00:00', '2023-04-01 03:07:06'),
(4, 0, 'Sonali Bank Ltd.', 'bank', '2023-04-01 03:07:06', '2023-04-01 03:07:06'),
(5, 0, 'Krishi Bank', 'bank', '2023-04-01 03:07:06', '2023-04-01 03:07:06'),
(6, 0, 'Janata  bank', 'bank', '2023-04-01 03:07:06', '2023-04-01 03:07:06'),
(7, 0, 'bKash', 'mobile', '2023-04-03 04:36:06', '2023-04-03 04:36:06'),
(8, 0, 'Nagad', 'mobile', '2023-04-03 04:36:06', '2023-04-03 04:36:06'),
(18, 0, 'Prime Bank', 'bank', '2024-10-01 09:58:15', '2024-10-01 09:58:15'),
(19, 0, 'Islami Bank Bangladesh Ltd.', 'bank', NULL, NULL),
(20, 0, 'Al Arafah Islami Bank', 'bank', NULL, NULL);

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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `parent_category_id` int(11) DEFAULT NULL,
  `image` varchar(200) DEFAULT NULL,
  `cat_name` varchar(100) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `position` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `shop_id`, `parent_category_id`, `image`, `cat_name`, `seller_id`, `created_at`, `position`, `updated_at`) VALUES
(1, 4, 0, NULL, 'Rod', 79, '2024-09-27 03:19:42', 1, '2024-09-27 03:20:00'),
(2, 4, 0, NULL, 'Cement', 79, '2024-09-27 03:19:50', 2, '2024-09-27 03:19:50'),
(3, 4, 1, NULL, 'GPH', 79, '2024-09-27 03:20:48', 3, '2024-10-12 09:52:28'),
(4, 4, 1, NULL, 'ASRM', 79, '2024-09-27 03:21:00', 4, '2024-09-27 03:21:00'),
(5, 4, 1, NULL, 'Non grade', 79, '2024-09-27 03:21:19', 5, '2024-09-27 03:21:19'),
(6, 4, 2, NULL, 'Bengal', 79, '2024-09-27 03:21:36', 6, '2024-09-27 03:21:36'),
(7, 4, 2, NULL, 'Holcim', 79, '2024-09-27 03:21:49', 7, '2024-09-27 03:21:49'),
(9, 4, 1, NULL, 'dfdf', 79, '2024-10-12 11:04:18', 8, '2024-10-12 11:04:18');

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

--
-- Table structure for table `coupons`
--

CREATE TABLE `coupons` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `coupon_date` date NOT NULL,
  `order_management_id` int(11) DEFAULT NULL,
  `payment_id` int(11) DEFAULT NULL,
  `total_coupon` int(11) NOT NULL,
  `service_no` varchar(50) NOT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `coupon_code` varchar(100) DEFAULT NULL,
  `status` varchar(20) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `coupons`
--

INSERT INTO `coupons` (`id`, `shop_id`, `coupon_date`, `order_management_id`, `payment_id`, `total_coupon`, `service_no`, `customer_id`, `coupon_code`, `status`, `seller_id`, `created_at`, `updated_at`) VALUES
(62, 4, '0000-00-00', 6, NULL, 3, '1', 115, NULL, 'in', 79, '2024-09-11 20:09:53', '2024-09-11 20:09:53'),
(63, 4, '0000-00-00', 7, NULL, 7, '2', 115, NULL, 'in', 79, '2024-09-17 17:16:37', '2024-09-17 17:16:37'),
(64, 4, '0000-00-00', 8, NULL, 6, '1', 115, NULL, 'in', 79, '2024-09-18 17:14:46', '2024-09-18 17:14:46'),
(65, 4, '0000-00-00', 9, NULL, 7, '1', 115, NULL, 'in', 79, '2024-09-18 17:29:59', '2024-09-18 17:29:59'),
(66, 4, '0000-00-00', 10, NULL, 8, '2', 115, NULL, 'in', 79, '2024-09-18 17:56:21', '2024-09-18 17:56:21'),
(67, 4, '0000-00-00', 11, NULL, 6, '5', 115, NULL, 'in', 79, '2024-09-18 18:18:26', '2024-09-18 18:18:26'),
(68, 4, '0000-00-00', 12, NULL, 7, '2', 115, NULL, 'in', 79, '2024-09-18 18:35:03', '2024-09-18 18:35:03'),
(69, 4, '0000-00-00', 13, NULL, 1, '5', 115, NULL, 'in', 79, '2024-09-18 18:51:51', '2024-09-18 18:51:51'),
(70, 4, '0000-00-00', 14, NULL, 8, '1', 115, NULL, 'in', 79, '2024-09-18 19:05:09', '2024-09-18 19:05:09'),
(71, 4, '0000-00-00', 15, NULL, 6, '2', 115, NULL, 'in', 79, '2024-09-18 19:19:39', '2024-09-18 19:19:39'),
(72, 4, '0000-00-00', 16, NULL, 15, '4', 115, NULL, 'in', 79, '2024-09-18 19:31:25', '2024-09-18 19:31:25'),
(73, 4, '0000-00-00', 17, NULL, 6, '2', 115, NULL, 'in', 79, '2024-09-18 23:10:10', '2024-09-18 23:10:10'),
(74, 4, '0000-00-00', 18, NULL, 12, '2', 115, NULL, 'in', 79, '2024-09-18 23:47:50', '2024-09-18 23:47:50'),
(75, 4, '0000-00-00', 19, NULL, 4, '1', 115, NULL, 'in', 79, '2024-09-18 23:51:32', '2024-09-18 23:51:32'),
(76, 4, '0000-00-00', 20, NULL, 10, '1', 115, NULL, 'in', 79, '2024-09-18 23:58:49', '2024-09-18 23:58:49');

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

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `customer_name` varchar(120) DEFAULT NULL,
  `email` varchar(20) DEFAULT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `status` int(11) DEFAULT NULL COMMENT 'activate=1,deactivate=0',
  `seller_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `production_unit_id`, `shop_id`, `customer_name`, `email`, `phone`, `address`, `status`, `seller_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 0, 'Nasir Uddin', 'nil', '5855', 'Bhairab', 1, 1, '2025-01-14 11:31:51', '2025-01-14 11:31:51', NULL),
(2, 1, 0, 'Sumon', NULL, '01725-097', 'Bhairab', 1, 1, '2025-01-14 12:12:50', '2025-01-14 12:12:50', NULL),
(3, 1, 0, 'Mohammad Ali', NULL, '01915', 'Bhairab', 1, 1, '2025-01-14 12:13:50', '2025-01-14 12:13:50', NULL),
(4, 1, 0, 'Ripon', NULL, '01642', 'Bhairab', 1, 1, '2025-01-14 12:15:40', '2025-01-14 12:15:40', NULL),
(5, 1, 0, 'Sabbir Enterprise', NULL, '01863', 'Bhairab', 1, 1, '2025-01-14 12:17:00', '2025-01-14 12:17:00', NULL),
(6, 1, 0, 'Sabbir Enterprise', NULL, '01863', 'Bhairab', 1, 1, '2025-01-14 12:17:00', '2025-01-14 12:17:00', NULL);

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

--
-- Table structure for table `custom_orders`
--

CREATE TABLE `custom_orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `seller_id` bigint(20) UNSIGNED NOT NULL,
  `channel_id` int(11) DEFAULT NULL,
  `contact_name` varchar(50) DEFAULT NULL,
  `customer_name` varchar(50) DEFAULT NULL,
  `contact_phone` varchar(20) DEFAULT NULL,
  `shipping_name` varchar(50) DEFAULT NULL,
  `shipping_phone` varchar(20) DEFAULT NULL,
  `shipping_address` text DEFAULT NULL,
  `shipping_district` varchar(100) DEFAULT NULL,
  `shipping_sub_district` varchar(100) DEFAULT NULL,
  `shipping_province` varchar(50) DEFAULT NULL,
  `shipping_postcode` varchar(10) DEFAULT NULL,
  `shipping_methods` varchar(100) DEFAULT NULL,
  `payment_url` varchar(191) DEFAULT NULL,
  `payment_status` int(11) NOT NULL,
  `order_id` varchar(191) NOT NULL,
  `shop_id` int(11) DEFAULT 0,
  `order_status` varchar(191) NOT NULL,
  `payment_method` int(11) DEFAULT NULL,
  `encrepted_order_id` text DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `sub_total` double NOT NULL DEFAULT 0,
  `shipping_cost` double NOT NULL DEFAULT 0,
  `total_discount` double NOT NULL DEFAULT 0,
  `in_total` double NOT NULL DEFAULT 0,
  `deleted_at` timestamp NULL 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 `custom_order_details`
--

CREATE TABLE `custom_order_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `custom_order_id` bigint(20) UNSIGNED NOT NULL,
  `shop_id` bigint(20) UNSIGNED NOT NULL,
  `product_name` varchar(100) NOT NULL,
  `product_description` text DEFAULT NULL,
  `product_price` double NOT NULL DEFAULT 0,
  `quantity` int(11) NOT NULL DEFAULT 0,
  `discount_price` double NOT NULL DEFAULT 0,
  `seller_id` bigint(20) UNSIGNED NOT NULL,
  `deleted_at` timestamp NULL 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 `custom_order_product_images`
--

CREATE TABLE `custom_order_product_images` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `custom_order_detail_id` bigint(20) UNSIGNED NOT NULL,
  `image` varchar(191) 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 `custom_order_product_images`
--

INSERT INTO `custom_order_product_images` (`id`, `custom_order_detail_id`, `image`, `created_at`, `updated_at`) VALUES
(1, 1, 'uploads/custom-order/product/25dc79b6-d163-4b21-9dae-9026e7b0ee5d.png', '2021-06-19 11:44:52', '2021-06-19 11:44:52'),
(2, 1, 'uploads/custom-order/product-image/dcef4860-5e1e-4c15-b844-4a5358b498ed.png', '2021-06-19 11:44:52', '2021-06-19 11:44:52'),
(3, 2, 'uploads/custom-order/products/70806061-1ca3-439c-8bea-2f8432007656.png', '2021-06-23 00:08:10', '2021-06-23 00:08:10');

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

--
-- Table structure for table `daily_production_costs`
--

CREATE TABLE `daily_production_costs` (
  `id` int(11) NOT NULL,
  `production_date` date NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `type` varchar(100) NOT NULL COMMENT 'product,RM',
  `rm_total_price` decimal(11,2) NOT NULL,
  `extra_charges_total` varchar(11) NOT NULL,
  `in_total` varchar(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `finsied_rm_id` int(11) NOT NULL,
  `production_qty` int(11) NOT NULL,
  `per_carton_cost` decimal(11,2) NOT NULL,
  `created_at` date NOT NULL,
  `updated_at` date NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `daily_production_costs`
--

INSERT INTO `daily_production_costs` (`id`, `production_date`, `production_unit_id`, `type`, `rm_total_price`, `extra_charges_total`, `in_total`, `product_id`, `finsied_rm_id`, `production_qty`, `per_carton_cost`, `created_at`, `updated_at`, `deleted_at`) VALUES
(10, '2025-01-02', 3, 'RM', 0.00, '0', '0', 0, 4, 1320, 0.00, '2025-01-06', '2025-01-06', NULL);

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

--
-- Table structure for table `delivery_challans`
--

CREATE TABLE `delivery_challans` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `order_management_id` int(11) NOT NULL,
  `delivery_date` date NOT NULL,
  `seller_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `vehicle_no` varchar(100) DEFAULT NULL,
  `chassis_no` varchar(50) NOT NULL,
  `driver_name` varchar(100) NOT NULL,
  `driver_mobile_no` varchar(50) NOT NULL,
  `driving_lic_no` varchar(50) NOT NULL,
  `destination` varchar(150) NOT NULL,
  `user_id` int(11) DEFAULT NULL COMMENT 'for dropshippers',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `delivery_challans`
--

INSERT INTO `delivery_challans` (`id`, `production_unit_id`, `order_management_id`, `delivery_date`, `seller_id`, `customer_id`, `shop_id`, `vehicle_no`, `chassis_no`, `driver_name`, `driver_mobile_no`, `driving_lic_no`, `destination`, `user_id`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 1, 3, '2025-01-01', 0, 1, NULL, '', '', '', '', '', '', NULL, NULL, '2025-01-23 06:01:43', '2025-01-23 06:01:43'),
(2, 1, 3, '2025-01-01', 0, 1, NULL, '', '', '', '', '', '', NULL, NULL, '2025-01-23 06:06:04', '2025-01-23 06:06:04'),
(3, 1, 3, '2025-01-01', 0, 1, NULL, '', '', '', '', '', '', NULL, NULL, '2025-01-23 06:06:33', '2025-01-23 06:06:33'),
(4, 1, 3, '2025-01-23', 0, 1, NULL, '', '', '', '', '', '', NULL, NULL, '2025-01-23 06:07:50', '2025-01-23 06:07:50'),
(5, 1, 3, '2025-01-23', 0, 1, NULL, '', '', '', '', '', '', NULL, NULL, '2025-01-23 06:08:22', '2025-01-23 06:08:22'),
(6, 1, 3, '2025-01-23', 0, 1, NULL, 'v443', '3434', '', '343', '334', '34343434', NULL, NULL, '2025-01-23 06:16:00', '2025-01-23 06:16:00'),
(7, 1, 3, '2025-01-23', 0, 1, NULL, 'v443', '3434', '', '343', '334', '34343434', NULL, NULL, '2025-01-23 06:17:00', '2025-01-23 06:17:00'),
(8, 1, 3, '2025-01-20', 0, 1, NULL, 'vvv', 'dsfdsf', '', 'dsfds', 'dsfdsf', 'dsfdsfdsf', NULL, NULL, '2025-01-23 06:17:17', '2025-01-23 06:17:17'),
(9, 1, 3, '2025-01-19', 0, 1, NULL, 'dfdsf', 'dfdsf', 'dfdsdf', 'dfdsfd', 'dfdsfd', 'dsfdsfdf', NULL, NULL, '2025-01-23 06:18:00', '2025-01-23 06:18:00'),
(10, 1, 3, '2025-01-19', 0, 1, NULL, 'dfdsf', 'dfdsf', 'dfdsf', 'dfdsfd', 'dfdsfd', 'dsfdsfdf', NULL, NULL, '2025-01-23 06:19:30', '2025-01-23 06:19:30'),
(11, 1, 3, '2025-01-23', 0, 1, NULL, 'aa', 'aa', 'Shafiqul ', '01714563214', '566654785', 'dfdf', NULL, NULL, '2025-01-23 06:22:14', '2025-01-23 06:22:14'),
(12, 1, 2, '2025-01-25', 0, 2, NULL, '1542', '568755', 'Rejaul Karim', '0124578565', '52140021', 'Donia, Jatrabari,Dhaka-12014', NULL, NULL, '2025-01-23 07:40:31', '2025-01-23 07:40:31'),
(13, 1, 3, '2025-01-23', 0, 1, NULL, '5622', '2641', 'Shafiqul', '012456984', '14541', 'Jatrabari,Dhaka-1200', NULL, NULL, '2025-01-23 08:16:37', '2025-01-23 08:16:37'),
(14, 1, 8, '2025-01-26', 0, 4, NULL, '4545', '5656565', 'Razib', '01234567', 'dfdf', '', NULL, NULL, '2025-01-26 10:13:18', '2025-01-26 10:13:18');

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

--
-- Table structure for table `delivery_challan_details`
--

CREATE TABLE `delivery_challan_details` (
  `id` int(11) NOT NULL,
  `delivery_challan_id` int(11) NOT NULL,
  `order_management_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `quantity` varchar(11) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `delivery_challan_details`
--

INSERT INTO `delivery_challan_details` (`id`, `delivery_challan_id`, `order_management_id`, `product_id`, `shop_id`, `quantity`, `seller_id`, `created_at`, `updated_at`) VALUES
(6, 0, 2, 8, NULL, '11', 1, '2025-01-20 15:10:22', '2025-01-20 15:10:22'),
(7, 0, 3, 7, NULL, '1', 1, '2025-01-21 17:00:33', '2025-01-21 17:00:33'),
(8, 0, 3, 8, NULL, '1', 1, '2025-01-21 17:00:33', '2025-01-21 17:00:33'),
(9, 0, 3, 10, NULL, '1', 1, '2025-01-21 17:00:33', '2025-01-21 17:00:33'),
(10, 0, 3, 2, NULL, '10', 1, '2025-01-21 17:00:33', '2025-01-21 17:00:33'),
(11, 0, 3, 1, NULL, '20', 1, '2025-01-21 17:00:33', '2025-01-21 17:00:33'),
(12, 10, 3, 7, NULL, '1', 1, '2025-01-23 06:19:30', '2025-01-23 06:19:30'),
(13, 10, 3, 8, NULL, '1', 1, '2025-01-23 06:19:30', '2025-01-23 06:19:30'),
(14, 10, 3, 10, NULL, '1', 1, '2025-01-23 06:19:30', '2025-01-23 06:19:30'),
(15, 10, 3, 2, NULL, '10', 1, '2025-01-23 06:19:30', '2025-01-23 06:19:30'),
(16, 10, 3, 1, NULL, '20', 1, '2025-01-23 06:19:30', '2025-01-23 06:19:30'),
(17, 11, 3, 7, NULL, '1', 1, '2025-01-23 06:22:14', '2025-01-23 06:22:14'),
(18, 11, 3, 8, NULL, '1', 1, '2025-01-23 06:22:14', '2025-01-23 06:22:14'),
(19, 11, 3, 10, NULL, '1', 1, '2025-01-23 06:22:14', '2025-01-23 06:22:14'),
(20, 11, 3, 2, NULL, '10', 1, '2025-01-23 06:22:14', '2025-01-23 06:22:14'),
(21, 11, 3, 1, NULL, '20', 1, '2025-01-23 06:22:14', '2025-01-23 06:22:14'),
(22, 12, 2, 8, NULL, '5', 1, '2025-01-23 07:40:31', '2025-01-23 07:40:31'),
(23, 13, 3, 2, NULL, '2', 1, '2025-01-23 08:16:37', '2025-01-23 08:16:37'),
(24, 13, 3, 1, NULL, '5', 1, '2025-01-23 08:16:37', '2025-01-23 08:16:37'),
(25, 14, 8, 3, NULL, '1', 1, '2025-01-26 10:13:18', '2025-01-26 10:13:18');

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

--
-- Table structure for table `districts`
--

CREATE TABLE `districts` (
  `id` int(10) UNSIGNED NOT NULL,
  `division` varchar(255) NOT NULL,
  `district` varchar(255) NOT NULL,
  `thana` varchar(255) NOT NULL,
  `postoffice` varchar(255) NOT NULL,
  `postcode` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

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

CREATE TABLE `employees` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `employee_name` varchar(120) DEFAULT NULL,
  `email` varchar(20) DEFAULT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `status` int(11) DEFAULT NULL COMMENT 'activate=1,deactivate=0',
  `seller_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `exchange_rate`
--

CREATE TABLE `exchange_rate` (
  `id` bigint(20) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `rate` decimal(11,2) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `exchange_rate`
--

INSERT INTO `exchange_rate` (`id`, `name`, `rate`, `seller_id`, `created_at`, `updated_at`) VALUES
(1, 'Tk', 1.00, 15, '2021-06-20 10:07:06', '2021-09-09 11:53:21');

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

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

CREATE TABLE `expenses` (
  `id` bigint(20) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `entry_date` date NOT NULL,
  `total` decimal(11,2) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `expense_details`
--

CREATE TABLE `expense_details` (
  `id` bigint(20) NOT NULL,
  `expense_id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `amount` decimal(11,2) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(191) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `connection` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `features`
--

CREATE TABLE `features` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `status` varchar(11) NOT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `initial_transactions`
--

CREATE TABLE `initial_transactions` (
  `id` int(11) NOT NULL,
  `transaction_type` enum('receivable','payable') NOT NULL,
  `shop_id` int(11) NOT NULL,
  `payment_date` datetime NOT NULL,
  `type` varchar(20) NOT NULL,
  `sister_concern_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `lender_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `partner_id` int(11) NOT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `bank_or_mobile_wallet_id` int(11) NOT NULL,
  `account_no_id` int(11) NOT NULL,
  `payment_status` varchar(11) DEFAULT NULL,
  `bank_account` varchar(250) DEFAULT NULL,
  `notes` varchar(250) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `initial_transactions`
--

INSERT INTO `initial_transactions` (`id`, `transaction_type`, `shop_id`, `payment_date`, `type`, `sister_concern_id`, `customer_id`, `supplier_id`, `staff_id`, `lender_id`, `employee_id`, `partner_id`, `amount`, `bank_or_mobile_wallet_id`, `account_no_id`, `payment_status`, `bank_account`, `notes`, `created_at`, `updated_at`, `user_id`) VALUES
(1, 'receivable', 0, '0000-00-00 00:00:00', '', 0, 1, 0, 0, 0, 0, 0, '00', 0, 0, NULL, NULL, NULL, '2025-01-14 11:31:51', '2025-01-14 11:31:51', 0),
(2, 'receivable', 0, '0000-00-00 00:00:00', '', 0, 2, 0, 0, 0, 0, 0, '0.00', 0, 0, NULL, NULL, NULL, '2025-01-14 12:12:50', '2025-01-14 12:12:50', 0),
(3, 'receivable', 0, '0000-00-00 00:00:00', '', 0, 3, 0, 0, 0, 0, 0, '0.00', 0, 0, NULL, NULL, NULL, '2025-01-14 12:13:50', '2025-01-14 12:13:50', 0),
(4, 'receivable', 0, '0000-00-00 00:00:00', '', 0, 4, 0, 0, 0, 0, 0, '0.00', 0, 0, NULL, NULL, NULL, '2025-01-14 12:15:40', '2025-01-14 12:15:40', 0),
(5, 'receivable', 0, '0000-00-00 00:00:00', '', 0, 5, 0, 0, 0, 0, 0, '0.00', 0, 0, NULL, NULL, NULL, '2025-01-14 12:17:00', '2025-01-14 12:17:00', 0),
(6, 'receivable', 0, '0000-00-00 00:00:00', '', 0, 6, 0, 0, 0, 0, 0, '0.00', 0, 0, NULL, NULL, NULL, '2025-01-14 12:17:00', '2025-01-14 12:17:00', 0),
(7, 'payable', 0, '0000-00-00 00:00:00', '', 0, 0, 1, 0, 0, 0, 0, '0', 0, 0, NULL, NULL, NULL, '2025-01-14 12:30:51', '2025-01-14 12:30:51', 0),
(8, 'payable', 0, '0000-00-00 00:00:00', '', 0, 0, 2, 0, 0, 0, 0, '0', 0, 0, NULL, NULL, NULL, '2025-01-14 12:32:38', '2025-01-14 12:32:38', 0),
(9, 'payable', 0, '0000-00-00 00:00:00', '', 0, 0, 3, 0, 0, 0, 0, '0', 0, 0, NULL, NULL, NULL, '2025-01-14 12:34:07', '2025-01-14 12:34:07', 0);

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

--
-- Table structure for table `investments`
--

CREATE TABLE `investments` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `partner_id` varchar(120) DEFAULT NULL,
  `amount` decimal(11,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `lenders`
--

CREATE TABLE `lenders` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `lender_name` varchar(120) DEFAULT NULL,
  `email` varchar(20) DEFAULT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `status` int(11) DEFAULT NULL COMMENT 'activate=1,deactivate=0',
  `seller_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

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

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(191) 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, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2021_03_13_162314_add_is_active_to_users_table', 2),
(5, '2021_03_14_220055_add_phone_to_users_table', 3),
(6, '2021_03_15_142014_add_phone_to_orders_table', 4),
(7, '2016_06_01_000001_create_oauth_auth_codes_table', 5),
(8, '2016_06_01_000002_create_oauth_access_tokens_table', 5),
(9, '2016_06_01_000003_create_oauth_refresh_tokens_table', 5),
(10, '2016_06_01_000004_create_oauth_clients_table', 5),
(11, '2016_06_01_000005_create_oauth_personal_access_clients_table', 5),
(12, '2021_08_13_183541_create_shopee_settings_table', 6),
(13, '2021_08_13_172131_create_shopees_table', 7),
(15, '2021_08_13_101416_create_tax_rate_settings_table', 9),
(16, '2021_08_13_101441_add_tax_info_to_order_managements', 10),
(17, '2021_08_16_104945_add_tax_enable_to_order_managements', 11),
(18, '2021_08_14_201631_create_shopee_products_table', 12),
(19, '2021_08_17_184705_add_company_x_field_to_order_managements', 13),
(20, '2021_08_17_220740_add_seller_id_to_tax_rate_settings', 14),
(21, '2021_08_19_082910_add_company_logo_to_tax_rate_settings', 15),
(22, '2021_08_23_201604_add_tax_invoice_note_to_order_managements', 16),
(23, '2021_08_23_085220_add_tax_name_to_tax_rate_settings', 17),
(24, '2021_08_23_203940_create_shopee_order_purchases_table', 18),
(25, '2021_08_23_205548_create_shopee_order_purchase_details', 19),
(26, '2021_08_24_213057_add_channel_id_in_woo_order_purchase_table', 20),
(28, '2021_08_24_180533_alter_order_id_in_shopee_order_purchases_table', 21),
(29, '2021_08_25_111800_create_translations_table', 22),
(30, '2021_08_25_112556_add_pref_lang_to_users_table', 23),
(34, '2021_09_01_211204_add_is_linked_to_lazada_products_table', 27),
(35, '2021_09_02_163123_add_display_field_to_channels_table', 28),
(36, '2021_08_29_172131_create_lazada_table', 29),
(37, '2021_08_30_183541_create_lazada_settings_table', 30),
(38, '2021_08_30_201631_create_lazada_products_table', 31),
(39, '2021_09_02_211030_alter_order_date_in_shopee_order_purchases_table', 32),
(40, '2021_09_03_204706_create_shopee_branches_table', 33),
(41, '2021_08_23_033549_add_fields_to_lazada_products_table', 34),
(42, '2021_09_06_134957_create_shopee_order_param_inits_table', 35),
(43, '2021_09_10_224459_add_columns_in_shopee_order_purchases_table', 36),
(44, '2021_09_12_184956_add_user_pass_in_shops_table', 37),
(45, '2021_09_12_184856_add_assigned_shops_in_users_table', 38),
(46, '2021_09_14_232116_add_columns_to_shopee_order_purchases_table', 39),
(47, '2021_09_15_232116_add_columns_type_to_shops_table', 40),
(48, '2021_09_15_220827_change_default_shipment_status_in_shipments_table', 41),
(49, '2021_09_18_150030_add_shipped_on_date_to_shopee_order_purchases', 42),
(50, '2021_09_21_232116_add_downloaded_at_shopee_order_purchases_table', 43),
(51, '2021_09_17_232643_create_shopee_airway_bill_pdfs_table', 44),
(52, '2021_09_23_012106_add_pecentage_to_shopee_airway_bill_pdfs_table', 45),
(53, '2021_09_24_223940_add_mark_as_shipped_at_column_in_shopee_order_purchases_table', 46),
(55, '2021_09_26_045406_create_do_do_chats_table', 47),
(57, '2021_09_28_131004_add_pickup_confirmed_at_to_shopee_order_purchases_table', 48),
(58, '2021_09_29_005453_add_pickup_shipped_on_column_to_shopee_order_purchases_table', 49),
(59, '2021_10_01_105412_add_shopee_shipping_method_to_shopee_order_purchases_table', 50),
(60, '2021_10_09_114633_create_lazada_order_purchases_table', 51),
(61, '2021_10_11_144556_create_lazada_order_purchase_items_table', 52),
(62, '2021_10_15_001150_add_website_id_in_lazada_order_purchase_items_table', 53),
(63, '2021_10_15_001211_add_derived_status_in_lazada_order_purchases_table', 54),
(64, '2021_10_15_002554_create_lazada_shipment_providers_table', 55),
(65, '2021_10_20_194709_rename_and_add_column_on_product_costs_table', 56),
(66, '2021_10_20_194709_rename_and_add_column_on_products_table', 57),
(67, '2021_10_21_190709_add_lowest_sell_price_to_products_table', 58),
(68, '2021_10_21_190710_add_lowest_sell_price_to_products_table', 59),
(69, '2021_10_22_124052_add_two_fields_on_products_table', 60),
(70, '2021_10_21_145222_create_lazada_bill_pdfs_table', 61),
(71, '2021_10_30_112448_add_columns_to_lazada_order_purchases_table', 62),
(72, '2021_11_02_141634_add_shop_id_to_shipment_table', 63),
(73, '2021_11_10_004958_create_shopee_product_categories_table', 64),
(74, '2021_11_20_174909_add_variation_id_on_shipment_products_table', 65),
(75, '2021_11_20_174908_add_variation_id_on_shipment_products_table', 66);

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

--
-- Table structure for table `models`
--

CREATE TABLE `models` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `modules`
--

CREATE TABLE `modules` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `active_status` tinyint(4) NOT NULL DEFAULT 1,
  `order` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `created_by` int(10) UNSIGNED DEFAULT 1,
  `updated_by` int(10) UNSIGNED DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `module_links`
--

CREATE TABLE `module_links` (
  `id` int(10) UNSIGNED NOT NULL,
  `module_id` int(10) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `route` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active_status` tinyint(4) NOT NULL DEFAULT 1,
  `created_by` int(10) UNSIGNED DEFAULT 1,
  `updated_by` int(10) UNSIGNED DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `oauth_access_tokens`
--

CREATE TABLE `oauth_access_tokens` (
  `id` varchar(100) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `client_id` char(36) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `scopes` text DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_access_tokens`
--

INSERT INTO `oauth_access_tokens` (`id`, `user_id`, `client_id`, `name`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) VALUES
('5920235aa1b2a92d0b34d32b7891b8facbcfdc2d4c3125a7f3e5f51590cea23795229d43698a4669', 15, '93e57474-e8af-4cf1-b3f3-a0c411ef8f57', '1234567', '[]', 0, '2021-07-12 17:45:24', '2021-07-12 17:45:24', '2022-01-13 00:45:24'),
('dc9a82f8a437d77dbe582f113c647fe462615cafb4d503317022b981025e0ae0adfc8a99bc36ad0f', 15, '9399c7d2-27c3-4ea2-b5a3-7c3c79f40a60', 'moin@gmail.com', '[]', 0, '2021-06-05 02:55:48', '2021-06-05 02:55:48', '2021-12-05 09:55:48');

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

--
-- Table structure for table `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `client_id` char(36) NOT NULL,
  `scopes` text DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `client_id` char(36) 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 `oauth_personal_access_clients`
--

INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES
(1, '9399c7d2-27c3-4ea2-b5a3-7c3c79f40a60', '2021-06-05 02:55:17', '2021-06-05 02:55:17'),
(2, '93e57474-e8af-4cf1-b3f3-a0c411ef8f57', '2021-07-12 17:45:06', '2021-07-12 17:45:06');

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

--
-- Table structure for table `oauth_refresh_tokens`
--

CREATE TABLE `oauth_refresh_tokens` (
  `id` varchar(100) NOT NULL,
  `access_token_id` varchar(100) NOT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` int(10) UNSIGNED NOT NULL,
  `shipper_id` int(10) UNSIGNED NOT NULL,
  `shop_id` varchar(10) NOT NULL,
  `tracking_id` varchar(255) NOT NULL,
  `buyer` varchar(255) NOT NULL,
  `input_method` enum('manual','import') NOT NULL,
  `date` date NOT NULL,
  `time` time NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `phone` varchar(191) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `order_managements`
--

CREATE TABLE `order_managements` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `order_date` date NOT NULL,
  `seller_id` int(11) NOT NULL,
  `have_coupon` int(11) NOT NULL,
  `have_services` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `customer_details` text DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `payment_url` varchar(255) DEFAULT NULL,
  `payment_status` int(11) NOT NULL,
  `place_order_time` datetime DEFAULT NULL,
  `sign` varchar(350) DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `order_id` varchar(255) NOT NULL,
  `is_confirmed` int(11) NOT NULL DEFAULT 0,
  `order_status` int(11) NOT NULL DEFAULT 0,
  `payment_method` int(11) DEFAULT NULL,
  `encrepted_order_id` text DEFAULT NULL,
  `product_price_total` varchar(11) DEFAULT NULL,
  `service_price_total` varchar(11) NOT NULL,
  `total_discount` varchar(11) DEFAULT NULL,
  `in_total` varchar(50) NOT NULL,
  `owner_type` varchar(20) NOT NULL,
  `payment_type` varchar(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL COMMENT 'for dropshippers',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_managements`
--

INSERT INTO `order_managements` (`id`, `production_unit_id`, `order_date`, `seller_id`, `have_coupon`, `have_services`, `customer_id`, `customer_details`, `shop_id`, `payment_url`, `payment_status`, `place_order_time`, `sign`, `payment_date`, `order_id`, `is_confirmed`, `order_status`, `payment_method`, `encrepted_order_id`, `product_price_total`, `service_price_total`, `total_discount`, `in_total`, `owner_type`, `payment_type`, `user_id`, `created_by`, `created_at`, `updated_at`) VALUES
(2, 1, '2025-01-15', 1, 0, 0, 2, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, '13rbJSGVXTTTm7Fg', 0, 2, NULL, 'eyJpdiI6IkZ5QldEVUpFV21ETHZmVGFtTTVQS3c9PSIsInZhbHVlIjoieUk0MjEwTEg4Z1BXQ2hrSXFRRTBJMGlhR1o2aXNjZ3dEejFkR055NEpZdz0iLCJtYWMiOiJhYjU3NDBhZDA3ZThhOGFkMGU2YmZhZDUyMWZiMmNkMjUxMjgwM2Y4OWE3YTA4ODUwOGUzY2RmMWM0NjJjNjc4IiwidGFnIjoiIn0=', '7700', '0', '0.00', '7700', 'private', 'fixed', 1, 1, '2025-01-15 11:30:52', '2025-01-15 11:30:52'),
(3, 1, '2025-01-16', 1, 0, 0, 1, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 'hGLsHcJQmUWWn9jw', 0, 2, NULL, 'eyJpdiI6ImFmeG1DYUxyZ29ZcytaSGtlWXZ4eGc9PSIsInZhbHVlIjoiWk1WbDVjTGhLU3VZMk9mMlB6SGQydG0xUXNTZFp6NVRWK1lYTzV3bG82ST0iLCJtYWMiOiI5NjgyYTU4NjNhNmVhM2Q0OTA1ZjA4MmNhOGI5ZTM5YWExNzE1MDA1MzhlNmIyNDY2Y2M4ZDE1ZThkZjFjYjU0IiwidGFnIjoiIn0=', '25200', '0', NULL, '25200', 'private', 'fixed', 1, 1, '2025-01-16 11:43:06', '2025-01-17 17:13:41'),
(4, 1, '2025-01-20', 1, 0, 1, 2, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 'VVbvDQS0ErarcRqj', 0, 2, NULL, 'eyJpdiI6IkNFWnFmZjZzVGh6UDVhdWMvd0NZNlE9PSIsInZhbHVlIjoiYmMvNkRCdHlyZEFlUi9TeTlFR045aXZZbFVhWkorRVVYS3c1OUdkOHZVUT0iLCJtYWMiOiI4Y2Q3NjkzM2JiMDg3YmNjNjE1MDQwMTE0ZWMxZjc4YjZiZmFmZDY0ZTNhNDI0MDI3MWNjYWM5NTQ5ZjkwZTZjIiwidGFnIjoiIn0=', '3500', '500', '0.00', '4000', 'private', 'fixed', 1, 1, '2025-01-20 10:42:17', '2025-01-20 10:42:17'),
(5, 1, '2025-01-20', 1, 0, 1, 5, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 'QIYSLmZs1jrD8sy0', 0, 2, NULL, 'eyJpdiI6IjNKd1c3MFhHV204dk1YdlQwZDY1MFE9PSIsInZhbHVlIjoiL0hMQUpBemg5aGFMdi93YjltUTRjQytzcVdtS1BPTkR5K3FKb3NNYXU0cz0iLCJtYWMiOiI1NjkyMjVjOWI3NjUwODhiZjdmMWNmMGI5ZWMxYzE0OWRhZTg1MzNkYTFmY2Q5Mjk0NDg5NjEwODA1ZmM1NGQ2IiwidGFnIjoiIn0=', '37000', '500', '0.00', '37500', 'private', 'fixed', 1, 1, '2025-01-20 14:36:47', '2025-01-20 14:36:48'),
(6, 1, '2025-01-23', 1, 0, 0, 4, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 't7W32l5gcCnoXruG', 0, 2, NULL, 'eyJpdiI6Im9XekI4cmxPbjdXUEwvOExqMnV0Mmc9PSIsInZhbHVlIjoieGhQWVFnRS9qMHlYdC9sN25yQ2psR0ZwcW0zd3pzQzRxdU1Mdng0cWhBST0iLCJtYWMiOiI5M2MzYjhlYmZjODRmMTRiN2VlYmFhZjQ4YTNkZjk0NzJlZTlmMzZlZTcwMmVkZGY1MGQ0ZmRmMDJjMTkxYzEzIiwidGFnIjoiIn0=', '700', '0', '0.00', '700', 'private', 'fixed', 1, 1, '2025-01-23 11:19:24', '2025-01-23 11:19:24'),
(7, 1, '2025-01-26', 1, 0, 0, 3, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 'c49RAlFtT9vQ0u3u', 0, 2, NULL, 'eyJpdiI6ImFodnZwaEVvRE50MmNCZTR1MzFPYUE9PSIsInZhbHVlIjoiRURKb2U0Q0ZoSHZIaW9SWTZ2MnFtR3JvWmtacHl0Yi9VM09wNGJ1bmhLVT0iLCJtYWMiOiI2NmRkNzlkM2FhNzVhZDIyZDcyNzVlODE3ZDhiOWE0NzhjYzkzMDNhNDg4ZGJmZTRhOTdmZWYzMWIwMDMwZDMyIiwidGFnIjoiIn0=', '700', '0', '0.00', '700', 'private', 'fixed', 1, 1, '2025-01-26 09:51:34', '2025-01-26 09:51:34'),
(8, 1, '2025-01-26', 1, 0, 0, 4, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 'FlYNMtDG27qL9qGh', 0, 2, NULL, 'eyJpdiI6IjdUYW0vQjBJTGlQZi9HSldkVGxoT3c9PSIsInZhbHVlIjoiSTFyZ1dPbjBTTk5xcjVXUFRydGEwUFNaUXpXWUttRVhNZW1CdFd4UVRJbz0iLCJtYWMiOiJlNjJmY2VlYzRhNzE2ZTc2ZjllNGU0YjUwY2NhOWZhY2UxNjczOGZjOGJjOGQxYTViMmRlOGU1YjcxMzEwODQ0IiwidGFnIjoiIn0=', '900', '0', '0.00', '900', 'private', 'fixed', 1, 1, '2025-01-26 10:10:21', '2025-01-26 10:10:21'),
(9, 1, '2025-01-26', 1, 0, 0, 4, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 'FlYNMtDG27qL9qGh', 0, 2, NULL, 'eyJpdiI6ImdRTnExSUY1bnQ2ZVU4bXBSVVRaZVE9PSIsInZhbHVlIjoiMVlTRjdFVjlhSDNPYzRTQi9iK2w0ampHNkpzRy9VVjB4THdMQktYZU5Mcz0iLCJtYWMiOiJkNGMwMTcyNDcxYzI0NzNmNjE2YTVlZjI5MGZhYjRkZmQ5ODI5OTY2NzI5ZTg5YjQ5ZjY2NWJkOGFmMjZiYjg1IiwidGFnIjoiIn0=', '900', '0', '0.00', '900', 'private', 'fixed', 1, 1, '2025-01-26 10:10:55', '2025-01-26 10:10:55'),
(10, 1, '2025-01-26', 1, 0, 0, 5, '\"\"', NULL, NULL, 0, NULL, NULL, NULL, 'sF9U0LOt4rLMHRUL', 0, 2, NULL, 'eyJpdiI6IlRCZWtRZUpObWY3S0RSTk5GNXRKZXc9PSIsInZhbHVlIjoid1RVM2Vyb2ZlUGZxeXJObHFVMzdSSnBlVVNNdlB1b2w3Vjd2Nm9wd0hpaz0iLCJtYWMiOiI0YzNhODc1NmNiMmQ3Njk3ZTE4MDg0YWI2YmU2ZDEzYjQ0MDFlYzE0YTAyNzMxMWZiNzQ5NTg3ZjAwNDU4Y2Q5IiwidGFnIjoiIn0=', '900', '0', '0.00', '900', 'private', 'fixed', 1, 1, '2025-01-26 10:11:09', '2025-01-26 10:11:09');

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

--
-- Table structure for table `order_management_details`
--

CREATE TABLE `order_management_details` (
  `id` int(11) NOT NULL,
  `order_management_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `product_code` varchar(100) NOT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `quantity` varchar(11) DEFAULT NULL,
  `cost_price` decimal(11,2) DEFAULT NULL,
  `price` decimal(11,2) NOT NULL DEFAULT 0.00,
  `product_discount` varchar(11) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_management_details`
--

INSERT INTO `order_management_details` (`id`, `order_management_id`, `product_id`, `product_code`, `shop_id`, `quantity`, `cost_price`, `price`, `product_discount`, `seller_id`, `created_at`, `updated_at`) VALUES
(2, 2, 8, '', NULL, '11', 0.00, 700.00, '0', 1, '2025-01-15 11:30:52', '2025-01-15 11:30:52'),
(4, 3, 2, '', NULL, '10', 0.00, 840.00, '0', 1, '2025-01-17 17:13:41', '2025-01-17 17:13:41'),
(5, 3, 1, '', NULL, '20', 0.00, 840.00, '0', 1, '2025-01-17 17:13:41', '2025-01-17 17:13:41'),
(6, 4, 1, '', NULL, '5', 0.00, 700.00, '0', 1, '2025-01-20 10:42:17', '2025-01-20 10:42:17'),
(7, 5, 3, '', NULL, '20', 0.00, 900.00, '0', 1, '2025-01-20 14:36:47', '2025-01-20 14:36:47'),
(8, 5, 2, '', NULL, '20', 0.00, 700.00, '0', 1, '2025-01-20 14:36:47', '2025-01-20 14:36:47'),
(9, 5, 1, '', NULL, '1', 0.00, 5000.00, '0', 1, '2025-01-20 14:36:47', '2025-01-20 14:36:47'),
(10, 6, 1, '', NULL, '1', 0.00, 700.00, '0', 1, '2025-01-23 11:19:24', '2025-01-23 11:19:24'),
(11, 7, 1, '', NULL, '1', 0.00, 700.00, '0', 1, '2025-01-26 09:51:34', '2025-01-26 09:51:34'),
(12, 8, 3, '', NULL, '1', 0.00, 900.00, '0', 1, '2025-01-26 10:10:21', '2025-01-26 10:10:21'),
(13, 9, 3, '', NULL, '1', 0.00, 900.00, '0', 1, '2025-01-26 10:10:55', '2025-01-26 10:10:55'),
(14, 10, 3, '', NULL, '1', 0.00, 900.00, '0', 1, '2025-01-26 10:11:09', '2025-01-26 10:11:09');

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

--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id` int(11) NOT NULL,
  `package_name` varchar(255) NOT NULL,
  `price` varchar(255) NOT NULL,
  `details` text DEFAULT NULL,
  `max_limit` varchar(100) DEFAULT NULL,
  `package_type` int(11) NOT NULL COMMENT '1 = daily , 2 = monthly',
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `packages`
--

INSERT INTO `packages` (`id`, `package_name`, `price`, `details`, `max_limit`, `package_type`, `created_at`, `updated_at`) VALUES
(2, 'Package 2', '1000', 'asdadasdasd', '12', 1, '2021-03-24', '2021-03-24'),
(3, 'package 3', '600', 'asdasd', '11', 1, '2021-03-24', '2021-03-24');

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

--
-- Table structure for table `partners`
--

CREATE TABLE `partners` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `name` varchar(120) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `phone` varchar(120) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

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

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

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

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `payment_date` date NOT NULL,
  `payment_time` varchar(100) DEFAULT NULL,
  `payment_for` varchar(50) DEFAULT NULL,
  `purchase_id` int(11) NOT NULL,
  `type` varchar(20) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `lender_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `partner_id` int(11) NOT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `paid` decimal(11,3) DEFAULT NULL,
  `payment_method_id` int(11) NOT NULL,
  `bank_or_mobile_wallet_id` int(11) DEFAULT NULL,
  `account_no_id` int(11) DEFAULT NULL,
  `payment_status` varchar(11) DEFAULT NULL,
  `bank_account` varchar(250) DEFAULT NULL,
  `notes` varchar(250) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `payments_manual`
--

CREATE TABLE `payments_manual` (
  `id` int(11) NOT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `payment_time` varchar(100) DEFAULT NULL,
  `payment_method_id` varchar(11) DEFAULT NULL,
  `bank_or_mobile_wallet_id` int(11) NOT NULL,
  `cheque_or_mobile_no` varchar(50) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_confirmed` int(11) NOT NULL DEFAULT 0,
  `is_refund` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `payment_methods`
--

CREATE TABLE `payment_methods` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `payment_methods`
--

INSERT INTO `payment_methods` (`id`, `name`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Cash', NULL, NULL, NULL),
(2, 'Banking', NULL, NULL, NULL),
(3, 'Mobile Banking', NULL, NULL, NULL);

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

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

CREATE TABLE `permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) NOT NULL,
  `user_type` int(11) NOT NULL COMMENT '0=staff, 1=dropshipper',
  `product_id` int(11) DEFAULT NULL,
  `slug` varchar(191) NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) 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`, `user_type`, `product_id`, `slug`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(2, 'Can access menu: Manage Users - Permissions', 0, NULL, '', NULL, NULL, '2021-06-12 00:55:45', '2021-06-16 01:56:09'),
(3, 'Can access menu: Manage Users - Role Management', 0, NULL, '', NULL, NULL, '2021-06-12 00:55:53', '2021-06-12 00:55:53'),
(4, 'Can access menu: Manage Users - Users', 0, NULL, '', NULL, NULL, '2021-06-12 00:56:00', '2021-06-12 00:56:00'),
(5, 'Can access menu: Order Management', 0, NULL, '', NULL, NULL, '2021-06-12 00:56:07', '2021-06-12 00:56:07'),
(6, 'Can access menu: Product', 0, NULL, '', NULL, NULL, '2021-06-12 00:56:16', '2021-06-12 00:56:16'),
(7, 'Can access menu: Purchase Order - Cost Analysis', 0, NULL, '', NULL, NULL, '2021-06-12 00:56:35', '2021-06-29 00:31:20'),
(8, 'Can access menu: Purchase Order - Purchase Order', 0, NULL, '', NULL, NULL, '2021-06-12 00:56:44', '2021-06-12 00:56:44'),
(9, 'Can access menu: Report - Stock', 0, NULL, '', NULL, NULL, '2021-06-12 00:56:51', '2021-06-12 00:56:51'),
(10, 'Can access menu: Report - Stock Movements', 0, NULL, '', NULL, NULL, '2021-06-12 00:56:58', '2021-06-12 00:56:58'),
(11, 'Can access menu: Stock Adjust - Adjustment', 0, NULL, '', NULL, NULL, '2021-06-12 00:57:06', '2021-06-12 00:57:06'),
(12, 'Can access menu: Stock Adjust - Defect Stock', 0, NULL, '', NULL, NULL, '2021-06-12 00:57:12', '2021-06-12 00:57:12'),
(13, 'Can access menu: Stock Adjust - History', 0, NULL, '', NULL, NULL, '2021-06-12 00:57:18', '2021-06-12 00:57:18'),
(14, 'Can access menu: All Shipment', 0, NULL, '', NULL, NULL, '2021-06-15 18:08:26', '2021-06-16 23:23:34'),
(15, 'Can access menu: Manage Shipper', 0, NULL, '', NULL, NULL, '2021-06-15 23:56:53', '2021-06-15 23:56:53'),
(16, 'Can access menu: Report - Activity Log', 0, NULL, '', NULL, NULL, '2021-06-15 23:58:44', '2021-06-15 23:58:44'),
(17, 'Can access menu: CRM - Customers', 0, NULL, '', NULL, NULL, '2021-06-21 00:47:37', '2021-06-21 00:47:37'),
(18, 'Can access menu: Purchase Order - Order Analysis', 0, NULL, '', NULL, NULL, '2021-06-29 00:31:30', '2021-06-29 00:31:30'),
(19, 'Can access menu: Purchase Order - Product Cost', 0, NULL, '', NULL, NULL, '2021-06-30 14:31:03', '2021-06-30 14:31:03'),
(20, 'Can access menu: Purchase Order - Settings', 0, NULL, '', NULL, NULL, '2021-07-15 03:45:43', '2021-07-15 03:45:43'),
(21, 'Can access menu: Dropshippers - Manage Dropshippers', 0, NULL, '', NULL, NULL, '2021-07-15 06:18:22', '2021-07-15 06:18:22'),
(22, 'Can access menu: Dropshippers - Role Management', 0, NULL, '', NULL, NULL, '2021-07-15 06:18:30', '2021-07-15 06:18:30');

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

--
-- Table structure for table `production_charges`
--

CREATE TABLE `production_charges` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `daily_production_id` int(11) DEFAULT NULL,
  `name` varchar(200) DEFAULT NULL,
  `price` decimal(11,2) NOT NULL DEFAULT 0.00,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `production_units`
--

CREATE TABLE `production_units` (
  `id` int(11) NOT NULL,
  `name` varchar(250) DEFAULT NULL,
  `location` varchar(200) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `status` int(11) NOT NULL COMMENT '0 = de-activate, 1 = activate',
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `production_units`
--

INSERT INTO `production_units` (`id`, `name`, `location`, `seller_id`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Siddirganj', 'Narayanganj', NULL, 1, '2025-01-12', '2025-01-12', NULL);

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

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

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `product_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `specifications` varchar(500) DEFAULT NULL,
  `pack` varchar(200) DEFAULT NULL,
  `currency` varchar(50) DEFAULT NULL,
  `cost_pc` int(11) DEFAULT NULL,
  `lowest_value` decimal(11,2) NOT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `product_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `product_tag_id` int(11) DEFAULT NULL,
  `seller_id` int(11) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `out_of_stock_reorder` varchar(10) NOT NULL,
  `low_stock_reorder` varchar(10) DEFAULT NULL,
  `from_where` int(11) NOT NULL COMMENT '1 = add product, 2 = genereate qr code',
  `price` varchar(255) DEFAULT NULL,
  `ship_cost` decimal(11,2) DEFAULT NULL,
  `weight` varchar(255) DEFAULT NULL,
  `cost_price` decimal(11,2) DEFAULT NULL,
  `dropship_price` int(11) DEFAULT NULL,
  `packs_per_carton` varchar(10) DEFAULT NULL,
  `pieces_per_pack` varchar(10) DEFAULT NULL,
  `cost_currency` varchar(100) DEFAULT NULL,
  `alert_stock` varchar(100) DEFAULT NULL,
  `product_status` int(11) NOT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `lowest_is_type` int(11) NOT NULL,
  `lowest_sell_price` decimal(10,2) NOT NULL,
  `profit` decimal(10,2) NOT NULL,
  `mark_up` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `products` (`id`, `product_name`, `specifications`, `pack`, `currency`, `cost_pc`, `lowest_value`, `shop_id`, `category_id`, `supplier_id`, `image`, `product_code`, `product_tag_id`, `seller_id`, `warehouse_id`, `out_of_stock_reorder`, `low_stock_reorder`, `from_where`, `price`, `ship_cost`, `weight`, `cost_price`, `dropship_price`, `packs_per_carton`, `pieces_per_pack`, `cost_currency`, `alert_stock`, `product_status`, `created_at`, `updated_at`, `deleted_at`, `lowest_is_type`, `lowest_sell_price`, `profit`, `mark_up`) VALUES
(1, 'DVR', NULL, NULL, NULL, NULL, 0.00, NULL, NULL, NULL, NULL, '01', NULL, 1, NULL, '', NULL, 0, '700', NULL, NULL, NULL, NULL, '1', NULL, NULL, '100', 0, '2025-01-14', '2025-01-14', NULL, 0, 0.00, 0.00, 0.00),
(2, 'NVR', NULL, NULL, NULL, NULL, 0.00, NULL, NULL, NULL, NULL, '02', NULL, 1, NULL, '', NULL, 0, '700', NULL, NULL, NULL, NULL, '1', NULL, NULL, '100', 0, '2025-01-14', '2025-01-14', NULL, 0, 0.00, 0.00, 0.00),
(3, 'CAMERA', NULL, NULL, NULL, NULL, 0.00, NULL, NULL, NULL, NULL, '03', NULL, 1, NULL, '', NULL, 0, '900', NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, 0, '2025-01-14', '2025-01-14', NULL, 0, 0.00, 0.00, 0.00);

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

--
-- Table structure for table `product_has_tags`
--

CREATE TABLE `product_has_tags` (
  `id` int(11) NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `product_tag_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `product_main_stocks`
--

CREATE TABLE `product_main_stocks` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `product_prices`
--

CREATE TABLE `product_prices` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `cost_price` varchar(255) NOT NULL,
  `quantity` int(11) NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `product_reorders`
--

CREATE TABLE `product_reorders` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `status` varchar(100) NOT NULL,
  `type` varchar(100) NOT NULL,
  `quantity` varchar(10) NOT NULL,
  `created_at` date NOT NULL,
  `updated_at` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `product_tags`
--

CREATE TABLE `product_tags` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(191) DEFAULT NULL,
  `seller_id` int(11) NOT 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 `product_tags`
--

INSERT INTO `product_tags` (`id`, `name`, `seller_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'New Product', 15, '2021-07-03 01:08:40', '2021-07-14 08:43:13', NULL),
(2, 'End Production Line', 15, '2021-07-03 01:08:46', '2021-07-03 01:08:46', NULL),
(3, 'Need Media Image', 15, '2021-07-06 00:05:05', '2021-07-06 00:05:05', NULL);

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

--
-- Table structure for table `purchases`
--

CREATE TABLE `purchases` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `order_date` date NOT NULL,
  `seller_id` int(11) NOT NULL,
  `have_services` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `payment_url` varchar(255) DEFAULT NULL,
  `payment_status` int(11) NOT NULL,
  `place_order_time` datetime DEFAULT NULL,
  `sign` varchar(350) DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `order_id` varchar(255) NOT NULL,
  `is_confirmed` int(11) NOT NULL DEFAULT 0,
  `purchase_status` int(11) NOT NULL DEFAULT 1,
  `payment_method` int(11) DEFAULT NULL,
  `encrepted_purchase_id` text DEFAULT NULL,
  `raw_material_price_total` varchar(11) DEFAULT NULL,
  `extra_charge_total` varchar(11) NOT NULL,
  `total_discount` varchar(11) DEFAULT NULL,
  `in_total` varchar(50) NOT NULL,
  `owner_type` varchar(20) NOT NULL,
  `payment_type` varchar(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL COMMENT 'for dropshippers',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `purchases`
--

INSERT INTO `purchases` (`id`, `production_unit_id`, `order_date`, `seller_id`, `have_services`, `supplier_id`, `shop_id`, `payment_url`, `payment_status`, `place_order_time`, `sign`, `payment_date`, `order_id`, `is_confirmed`, `purchase_status`, `payment_method`, `encrepted_purchase_id`, `raw_material_price_total`, `extra_charge_total`, `total_discount`, `in_total`, `owner_type`, `payment_type`, `user_id`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 1, '2025-01-26', 1, 0, 1, NULL, NULL, 0, NULL, NULL, NULL, '', 0, 1, NULL, NULL, '0', '0', '0.00', '0', '', '', 1, 1, '2025-01-26 10:28:32', '2025-01-26 10:28:32');

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

--
-- Table structure for table `purchase_details`
--

CREATE TABLE `purchase_details` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `raw_material_id` int(11) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `quantity` varchar(11) DEFAULT NULL,
  `price` decimal(11,2) NOT NULL DEFAULT 0.00,
  `discount` varchar(11) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `purchase_details`
--

INSERT INTO `purchase_details` (`id`, `production_unit_id`, `purchase_id`, `raw_material_id`, `shop_id`, `quantity`, `price`, `discount`, `seller_id`, `created_at`, `updated_at`) VALUES
(1, 0, 1, 5, NULL, '34', 0.00, NULL, 1, '2025-01-26 10:28:32', '2025-01-26 10:28:32');

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

--
-- Table structure for table `purchase_extra_charges`
--

CREATE TABLE `purchase_extra_charges` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `name` varchar(200) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `price` decimal(11,2) NOT NULL DEFAULT 0.00,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `raw_materials`
--

CREATE TABLE `raw_materials` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` text NOT NULL,
  `unit` varchar(191) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `seller_id` int(11) 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 `raw_materials`
--

INSERT INTO `raw_materials` (`id`, `name`, `unit`, `status`, `seller_id`, `created_at`, `updated_at`) VALUES
(1, 'Wood Powder', 'pcs', 1, NULL, '2025-01-14 12:20:32', '2025-01-14 12:22:02'),
(2, 'CSP', 'Kg', 1, NULL, '2025-01-14 12:23:25', '2025-01-14 12:23:25'),
(3, 'TSHP', 'Kg', 1, NULL, '2025-01-14 12:24:01', '2025-01-14 12:24:01'),
(4, 'Joss Powder', 'Kg', 1, NULL, '2025-01-14 12:24:21', '2025-01-14 12:24:21'),
(5, 'Chemical', 'Kg', 1, NULL, '2025-01-14 12:24:52', '2025-01-14 12:24:52'),
(6, 'Color Violet', 'Kg', 1, NULL, '2025-01-14 12:25:12', '2025-01-14 12:25:12'),
(7, 'Color Red', 'Kg', 1, NULL, '2025-01-14 12:25:27', '2025-01-14 12:25:27'),
(8, 'Color Green', 'Kg', 1, NULL, '2025-01-14 12:25:43', '2025-01-14 12:25:43'),
(9, 'Color Black', 'Kg', 1, NULL, '2025-01-14 12:25:56', '2025-01-14 12:25:56'),
(10, 'Color Yellow', 'Kg', 1, NULL, '2025-01-14 12:26:11', '2025-01-14 12:26:11');

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

--
-- Table structure for table `receive_payments`
--

CREATE TABLE `receive_payments` (
  `id` int(11) NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `receive_for` varchar(50) DEFAULT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `paid` double(11,2) NOT NULL,
  `order_id` int(11) DEFAULT NULL,
  `service_id` int(11) NOT NULL,
  `type` varchar(20) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `lender_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_time` varchar(100) DEFAULT NULL,
  `payment_method_id` varchar(11) DEFAULT NULL,
  `bank_or_mobile_wallet_id` int(11) DEFAULT NULL,
  `account_no_id` int(11) DEFAULT NULL,
  `notes` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_confirmed` int(11) NOT NULL DEFAULT 0,
  `is_refund` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `receive_payments`
--

INSERT INTO `receive_payments` (`id`, `production_unit_id`, `shop_id`, `receive_for`, `amount`, `paid`, `order_id`, `service_id`, `type`, `customer_id`, `lender_id`, `user_id`, `payment_date`, `payment_time`, `payment_method_id`, `bank_or_mobile_wallet_id`, `account_no_id`, `notes`, `created_at`, `updated_at`, `is_confirmed`, `is_refund`) VALUES
(1, 1, 0, NULL, '10000', 10000.00, 3, 0, 'customer', 1, 0, NULL, '2025-01-16', '05:13', '2', 2, 12, 'From Sale', '2025-01-16 11:43:06', '2025-01-16 11:43:06', 1, 0),
(2, 1, 0, NULL, '5000', 5000.00, 4, 0, 'customer', 2, 0, NULL, '2025-01-20', '04:42', '1', NULL, 0, 'From Sale', '2025-01-20 10:42:17', '2025-01-20 10:42:17', 1, 0),
(3, 1, 0, '', '500', 500.00, 0, 0, 'customer', 3, 0, 1, '2025-01-26', NULL, '1', 0, 0, NULL, '2025-01-26 10:28:09', '2025-01-26 10:28:09', 0, 0);

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

--
-- Table structure for table `rm_stock_logs`
--

CREATE TABLE `rm_stock_logs` (
  `id` int(11) NOT NULL,
  `stock_date` date NOT NULL,
  `production_unit_id` int(11) NOT NULL,
  `daily_production_id` int(11) DEFAULT NULL,
  `purchase_id` int(11) NOT NULL,
  `raw_material_id` int(11) NOT NULL,
  `price` decimal(11,2) NOT NULL,
  `quantity` varchar(11) NOT NULL,
  `defect_quantity` int(11) DEFAULT NULL,
  `staff_id` int(11) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `stock_status` int(11) NOT NULL COMMENT '1 = check in, 0 = check out, 2 = defect',
  `is_defect` int(11) NOT NULL DEFAULT 0,
  `defect_note` text DEFAULT NULL,
  `defect_result` varchar(300) DEFAULT NULL,
  `defect_status` varchar(50) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `rm_stock_logs`
--

INSERT INTO `rm_stock_logs` (`id`, `stock_date`, `production_unit_id`, `daily_production_id`, `purchase_id`, `raw_material_id`, `price`, `quantity`, `defect_quantity`, `staff_id`, `seller_id`, `stock_status`, `is_defect`, `defect_note`, `defect_result`, `defect_status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '0000-00-00', 1, NULL, 1, 5, 0.00, '34', NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2025-01-26', '2025-01-26', NULL);

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

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

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) NOT NULL,
  `user_type` int(11) NOT NULL COMMENT '0=staff, 1=dropshipper',
  `slug` varchar(191) NOT NULL,
  `description` text DEFAULT NULL,
  `active_status` tinyint(4) NOT NULL DEFAULT 1,
  `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`, `user_type`, `slug`, `description`, `active_status`, `created_at`, `updated_at`) VALUES
(1, 'superadmin', 0, '', 'Super Admin', 1, '2021-06-12 03:42:43', '2024-06-14 18:41:49'),
(2, 'admin', 0, '', 'Admin', 1, '2021-06-27 08:53:56', '2024-06-19 15:55:02'),
(5, 'staff', 0, '', 'Staff', 1, '2024-06-19 15:56:51', '2024-06-19 15:56:51'),
(6, 'owner', 0, '', 'Owner', 1, NULL, NULL);

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

--
-- Table structure for table `roles_permissions`
--

CREATE TABLE `roles_permissions` (
  `role_id` int(10) UNSIGNED NOT NULL,
  `permission` text NOT NULL,
  `permission_id` int(10) UNSIGNED NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) 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_permissions`
--

INSERT INTO `roles_permissions` (`role_id`, `permission`, `permission_id`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(2, '[\"add_product\",\"edit_product\",\"delete_product\",\"add_remove_stock_product\",\"create_sale\",\"edit_sale\",\"delete_sale\",\"create_purchase\",\"edit_purchase\",\"delete_purchase\",\"add_customer\",\"edit_customer\",\"delete_customer\",\"add_supplier\",\"edit_supplier\",\"delete_supplier\",\"add_employee\",\"edit_employee\",\"delete_employee\",\"add_lender\",\"edit_lender\",\"delete_lender\"]', 0, 59, NULL, '2024-08-06 11:47:15', '2024-08-06 11:47:15'),
(5, '[\"add_product\",\"edit_product\",\"delete_product\",\"add_remove_stock_product\",\"create_sale\",\"edit_sale\",\"create_purchase\",\"delete_purchase\",\"add_customer\",\"edit_customer\",\"add_supplier\",\"add_employee\",\"edit_employee\",\"add_lender\",\"edit_lender\"]', 0, 79, NULL, '2024-08-26 02:04:05', '2024-08-26 02:04:05');

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

--
-- Table structure for table `services`
--

CREATE TABLE `services` (
  `id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `channel` varchar(50) DEFAULT NULL,
  `channel_id` int(11) DEFAULT NULL COMMENT '1 = facebook,2 = line,3 = phone',
  `customer_type` varchar(50) NOT NULL,
  `customer_name` varchar(150) DEFAULT NULL,
  `contact_phone` varchar(15) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `payment_url` varchar(255) DEFAULT NULL,
  `payment_status` int(11) NOT NULL,
  `place_order_time` datetime DEFAULT NULL,
  `sign` varchar(350) DEFAULT NULL,
  `payment_channel_from_ksher` varchar(100) DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `service_id` varchar(255) NOT NULL,
  `is_confirmed` int(11) NOT NULL DEFAULT 0,
  `order_status` int(11) NOT NULL DEFAULT 0,
  `payment_method` int(11) DEFAULT NULL,
  `encrepted_service_id` text DEFAULT NULL,
  `sub_total` int(11) DEFAULT NULL,
  `tax_rate` decimal(11,2) NOT NULL DEFAULT 0.00,
  `shipping_cost` varchar(50) DEFAULT NULL,
  `total_discount` int(11) DEFAULT NULL,
  `total_product_weight` int(11) DEFAULT NULL,
  `in_total` varchar(50) NOT NULL,
  `customer_id` varchar(20) DEFAULT NULL,
  `payment_type` varchar(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL COMMENT 'for dropshippers',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `service_details`
--

CREATE TABLE `service_details` (
  `id` int(11) NOT NULL,
  `order_management_id` int(11) DEFAULT NULL,
  `service_name` varchar(200) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `price` decimal(11,2) NOT NULL DEFAULT 0.00,
  `ram_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `service_details`
--

INSERT INTO `service_details` (`id`, `order_management_id`, `service_name`, `shop_id`, `price`, `ram_id`, `employee_id`, `seller_id`, `created_at`, `updated_at`) VALUES
(1, 4, 'Services', NULL, 500.00, 0, 0, 1, '2025-01-20 10:42:17', '2025-01-20 10:42:17'),
(2, 5, 'Services', NULL, 500.00, 0, 0, 1, '2025-01-20 14:36:47', '2025-01-20 14:36:47');

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

--
-- Table structure for table `shipments`
--

CREATE TABLE `shipments` (
  `id` int(11) NOT NULL,
  `shipment_status` int(11) DEFAULT 10,
  `shipment_date` date DEFAULT NULL,
  `print_status` int(11) NOT NULL DEFAULT 0,
  `print_date_time` datetime DEFAULT NULL,
  `print_by` int(11) DEFAULT NULL,
  `pack_status` varchar(100) NOT NULL DEFAULT '0',
  `packed_date_time` datetime DEFAULT NULL,
  `packed_by` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_custom` int(11) DEFAULT NULL,
  `is_woo` int(11) DEFAULT NULL,
  `mark_as_shipped_status` int(10) UNSIGNED NOT NULL,
  `mark_as_shipped_date_time` date DEFAULT NULL,
  `mark_as_shipped_by` int(11) DEFAULT NULL,
  `shipment_for` int(11) DEFAULT NULL,
  `shop_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `shipments`
--

INSERT INTO `shipments` (`id`, `shipment_status`, `shipment_date`, `print_status`, `print_date_time`, `print_by`, `pack_status`, `packed_date_time`, `packed_by`, `order_id`, `seller_id`, `created_at`, `updated_at`, `is_custom`, `is_woo`, `mark_as_shipped_status`, `mark_as_shipped_date_time`, `mark_as_shipped_by`, `shipment_for`, `shop_id`) VALUES
(198, 11, '2021-11-21', 0, NULL, NULL, '0', NULL, 0, 10854, 15, '2021-11-21 05:35:43', NULL, 0, NULL, 0, NULL, NULL, 5, 5),
(199, 10, '2024-06-11', 0, NULL, NULL, '0', NULL, 0, 9687, 15, '2024-06-11 12:04:50', '2024-06-11 12:04:50', NULL, NULL, 0, NULL, NULL, NULL, 0),
(200, 10, '2024-06-11', 0, NULL, NULL, '0', NULL, 0, 9705, 15, '2024-06-11 12:04:50', '2024-06-11 12:04:50', NULL, NULL, 0, NULL, NULL, NULL, 0);

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

--
-- Table structure for table `shipment_products`
--

CREATE TABLE `shipment_products` (
  `id` int(11) NOT NULL,
  `shipment_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `variation_id` int(11) NOT NULL,
  `ordered_qty` int(11) NOT NULL,
  `quantity` int(11) DEFAULT NULL,
  `order_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `shippers`
--

CREATE TABLE `shippers` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `seller_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `shippers`
--

INSERT INTO `shippers` (`id`, `name`, `seller_id`) VALUES
(1, 'EMS (2-5 Days)', 15),
(2, 'Jingjo Packaging', NULL),
(3, 'Kerry Express', NULL),
(5, 'Kerry Express (2-7 Days)', 15),
(6, 'test', 79);

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

--
-- Table structure for table `shipping_costs`
--

CREATE TABLE `shipping_costs` (
  `id` int(11) NOT NULL,
  `shipper_id` int(11) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `weight_from` int(11) DEFAULT NULL,
  `weight_to` int(11) DEFAULT NULL,
  `price` varchar(255) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `shipping_costs`
--

INSERT INTO `shipping_costs` (`id`, `shipper_id`, `name`, `weight_from`, `weight_to`, `price`, `seller_id`, `created_at`, `updated_at`) VALUES
(59, 0, 'test (Custom)', 0, 0, '222', NULL, '2024-06-06', '2024-06-06'),
(60, 6, 'test1', 100, 500, '600', 79, '2024-06-24', '2024-06-24');

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

--
-- Table structure for table `ship_types`
--

CREATE TABLE `ship_types` (
  `id` int(11) NOT NULL,
  `name` varchar(250) DEFAULT NULL,
  `created_at` date NOT NULL,
  `updated_at` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ship_types`
--

INSERT INTO `ship_types` (`id`, `name`, `created_at`, `updated_at`) VALUES
(4, 'EK', '2021-07-03', '2021-07-03'),
(5, 'SEA', '2021-07-03', '2021-07-03'),
(6, 'Ship From Thailand', '2021-07-10', '2021-07-10');

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

--
-- Table structure for table `shops`
--

CREATE TABLE `shops` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `shop_type` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `phone_showroom` varchar(50) DEFAULT NULL,
  `phone_service` varchar(100) DEFAULT NULL,
  `email` varchar(50) NOT NULL,
  `district` varchar(100) DEFAULT NULL,
  `sub_district` varchar(100) DEFAULT NULL,
  `province` varchar(100) DEFAULT NULL,
  `postcode` varchar(100) DEFAULT NULL,
  `address` varchar(300) DEFAULT NULL,
  `seller_id` int(11) NOT NULL,
  `logo` varchar(200) DEFAULT NULL,
  `username` varchar(191) DEFAULT NULL,
  `password` varchar(191) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `sister_concerns`
--

CREATE TABLE `sister_concerns` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `name` varchar(120) DEFAULT NULL,
  `initial_due_amount` varchar(11) DEFAULT NULL,
  `contact_phone` varchar(15) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `sizes`
--

CREATE TABLE `sizes` (
  `id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `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` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `cost_price` decimal(11,2) DEFAULT 0.00,
  `quantity` int(11) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `stock_logs`
--

CREATE TABLE `stock_logs` (
  `id` int(11) NOT NULL,
  `date` date NOT NULL,
  `production_unit_id` int(11) DEFAULT NULL,
  `daily_production_id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `product_code` varchar(100) NOT NULL,
  `cost_price` decimal(11,2) DEFAULT NULL,
  `price` decimal(11,2) NOT NULL,
  `quantity` int(11) NOT NULL,
  `defect_quantity` int(11) DEFAULT NULL,
  `staff_id` int(11) DEFAULT NULL,
  `seller_id` int(11) DEFAULT NULL,
  `stock_status` int(11) NOT NULL COMMENT '1 = check in, 0 = check out, 2 = defect',
  `is_defect` int(11) NOT NULL DEFAULT 0,
  `defect_note` text DEFAULT NULL,
  `defect_result` varchar(300) DEFAULT NULL,
  `defect_status` varchar(50) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `stock_logs`
--

INSERT INTO `stock_logs` (`id`, `date`, `production_unit_id`, `daily_production_id`, `order_id`, `product_id`, `product_code`, `cost_price`, `price`, `quantity`, `defect_quantity`, `staff_id`, `seller_id`, `stock_status`, `is_defect`, `defect_note`, `defect_result`, `defect_status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, '0000-00-00', 1, 0, 0, 1, '', NULL, 0.00, 200, NULL, NULL, 1, 1, 0, '', NULL, NULL, '2025-01-14', '2025-01-14', NULL),
(3, '2025-01-15', 1, 0, 2, 8, '', 0.00, 700.00, 11, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-15', '2025-01-15', NULL),
(5, '2025-01-16', 1, 0, 3, 2, '', 0.00, 840.00, 10, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-17', '2025-01-17', NULL),
(6, '2025-01-16', 1, 0, 3, 1, '', 0.00, 840.00, 20, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-17', '2025-01-17', NULL),
(7, '2025-01-20', 1, 0, 4, 1, '', 0.00, 700.00, 5, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-20', '2025-01-20', NULL),
(8, '2025-01-20', 1, 0, 5, 3, '', 0.00, 900.00, 20, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-20', '2025-01-20', NULL),
(9, '2025-01-20', 1, 0, 5, 2, '', 0.00, 700.00, 20, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-20', '2025-01-20', NULL),
(10, '2025-01-20', 1, 0, 5, 1, '', 0.00, 5000.00, 1, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-20', '2025-01-20', NULL),
(11, '2025-01-23', 1, 0, 6, 1, '', 0.00, 700.00, 1, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-23', '2025-01-23', NULL),
(12, '2025-01-26', 1, 0, 7, 1, '', 0.00, 700.00, 1, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-26', '2025-01-26', NULL),
(13, '2025-01-26', 1, 0, 8, 3, '', 0.00, 900.00, 1, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-26', '2025-01-26', NULL),
(14, '2025-01-26', 1, 0, 9, 3, '', 0.00, 900.00, 1, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-26', '2025-01-26', NULL),
(15, '2025-01-26', 1, 0, 10, 3, '', 0.00, 900.00, 1, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2025-01-26', '2025-01-26', NULL),
(16, '0000-00-00', 1, 0, 0, 3, '', NULL, 0.00, 100, NULL, NULL, 1, 1, 0, '', NULL, NULL, '2025-01-26', '2025-01-26', NULL),
(17, '0000-00-00', 1, 0, 0, 1, '', NULL, 0.00, 50, NULL, NULL, 1, 1, 0, '', NULL, NULL, '2025-01-26', '2025-01-26', NULL),
(18, '0000-00-00', 1, 0, 0, 3, '', NULL, 0.00, 50, NULL, NULL, 1, 1, 0, '', NULL, NULL, '2025-01-26', '2025-01-26', NULL);

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

--
-- Table structure for table `stock_product_deffect_images`
--

CREATE TABLE `stock_product_deffect_images` (
  `id` int(11) NOT NULL,
  `stock_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `image` varchar(200) DEFAULT NULL,
  `staff_id` int(11) DEFAULT NULL,
  `date` datetime NOT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` int(11) NOT NULL,
  `production_unit_id` varchar(11) NOT NULL,
  `supplier_name` varchar(255) NOT NULL,
  `email` varchar(30) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `status` text DEFAULT NULL COMMENT 'activate=1,deactivate=0',
  `seller_id` int(11) NOT NULL,
  `created_at` date NOT NULL,
  `updated_at` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `suppliers`
--

INSERT INTO `suppliers` (`id`, `production_unit_id`, `supplier_name`, `email`, `phone`, `address`, `status`, `seller_id`, `created_at`, `updated_at`) VALUES
(1, '1', 'Tip Top', NULL, '01975-76666', 'Dhaka', '1', 1, '2025-01-14', '2025-01-14'),
(2, '1', 'Saiful ', NULL, '43545454', 'Matuail', '1', 1, '2025-01-14', '2025-01-14'),
(3, '1', 'Razib', NULL, '01711-4545454', 'Mitford ,Dhaka', '1', 1, '2025-01-14', '2025-01-14');

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

--
-- Table structure for table `supplier_contacts`
--

CREATE TABLE `supplier_contacts` (
  `id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `contact_channel` varchar(255) DEFAULT NULL,
  `contact` varchar(100) 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 `tax_rate_settings`
--

CREATE TABLE `tax_rate_settings` (
  `id` int(10) UNSIGNED NOT NULL,
  `seller_id` int(11) NOT NULL DEFAULT 0,
  `tax_name` varchar(20) DEFAULT 'VAT',
  `tax_rate` decimal(11,2) NOT NULL DEFAULT 0.00,
  `tax_number` varchar(20) DEFAULT NULL,
  `company_name` varchar(50) DEFAULT NULL,
  `company_logo` varchar(191) DEFAULT NULL,
  `company_phone` varchar(20) DEFAULT NULL,
  `company_contact_person` varchar(30) DEFAULT NULL,
  `company_address` text DEFAULT NULL,
  `company_province` varchar(50) DEFAULT NULL,
  `company_district` varchar(50) DEFAULT NULL,
  `company_sub_district` varchar(50) DEFAULT NULL,
  `company_postcode` varchar(5) 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 `tax_rate_settings`
--

INSERT INTO `tax_rate_settings` (`id`, `seller_id`, `tax_name`, `tax_rate`, `tax_number`, `company_name`, `company_logo`, `company_phone`, `company_contact_person`, `company_address`, `company_province`, `company_district`, `company_sub_district`, `company_postcode`, `created_at`, `updated_at`) VALUES
(2, 79, 'VAT', 15.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-06-24 06:18:00', '2024-06-24 06:18:00');

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

--
-- Table structure for table `tracking_logs`
--

CREATE TABLE `tracking_logs` (
  `id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `track_id` varchar(255) NOT NULL,
  `date` date NOT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `translations`
--

CREATE TABLE `translations` (
  `id` int(10) UNSIGNED NOT NULL,
  `key` varchar(191) NOT NULL,
  `lang_en` varchar(191) DEFAULT NULL,
  `lang_bn` varchar(191) 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 `users_permissions`
--

CREATE TABLE `users_permissions` (
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `permission_id` int(10) UNSIGNED NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `users_roles`
--

CREATE TABLE `users_roles` (
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users_roles`
--

INSERT INTO `users_roles` (`user_id`, `role_id`, `created_by`, `updated_by`) VALUES
(61, 2, NULL, NULL),
(79, 1, NULL, NULL);

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

--
-- Indexes for table `custom_orders`
--
ALTER TABLE `custom_orders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `custom_orders_seller_id_index` (`seller_id`);

--
-- Indexes for table `custom_order_details`
--
ALTER TABLE `custom_order_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `custom_order_details_custom_order_id_index` (`custom_order_id`),
  ADD KEY `custom_order_details_shop_id_index` (`shop_id`),
  ADD KEY `custom_order_details_seller_id_index` (`seller_id`);

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `oauth_refresh_tokens`
--
ALTER TABLE `oauth_refresh_tokens`
  ADD PRIMARY KEY (`id`),
  ADD KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `shipper_id` (`shipper_id`),
  ADD KEY `user` (`shop_id`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `roles_permissions`
--
ALTER TABLE `roles_permissions`
  ADD PRIMARY KEY (`role_id`) USING BTREE;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `translations`
--
ALTER TABLE `translations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `translations_key_index` (`key`);

--
-- Indexes for table `users_permissions`
--
ALTER TABLE `users_permissions`
  ADD PRIMARY KEY (`user_id`,`permission_id`),
  ADD KEY `users_permissions_permission_id_foreign` (`permission_id`);

--
-- Indexes for table `users_roles`
--
ALTER TABLE `users_roles`
  ADD PRIMARY KEY (`user_id`,`role_id`),
  ADD KEY `users_roles_role_id_foreign` (`role_id`),
  ADD KEY `users_roles_user_id_foreign` (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `districts`
--
ALTER TABLE `districts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `exchange_rate`
--
ALTER TABLE `exchange_rate`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
  ADD CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`shipper_id`) REFERENCES `shippers` (`id`);

--
-- Constraints for table `users_permissions`
--
ALTER TABLE `users_permissions`
  ADD CONSTRAINT `users_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `users_permissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `users_roles`
--
ALTER TABLE `users_roles`
  ADD CONSTRAINT `users_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `users_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

