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

START TRANSACTION;



--
-- Database: `laravel_app`
--

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

--
-- Table structure for table `core_attendances`
--

CREATE TABLE `core_attendances` (
  `id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `attendance_date` date NOT NULL,
  `check_in` time DEFAULT NULL,
  `check_out` time DEFAULT NULL,
  `status` varchar(20) DEFAULT 'Present',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_attendances`
--

INSERT INTO `core_attendances` (`id`, `employee_id`, `attendance_date`, `check_in`, `check_out`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, '2024-07-03', '00:01:00', '04:07:00', 'Done', '2024-07-02 12:02:25', '2024-07-02 12:02:25'),
(3, 4, '2024-07-16', '10:10:00', '22:10:00', 'Active', '2024-07-15 22:10:38', '2024-07-15 22:10:38');

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

--
-- Table structure for table `core_customers`
--

CREATE TABLE `core_customers` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `email` varchar(100) NOT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_customers`
--

INSERT INTO `core_customers` (`id`, `name`, `email`, `phone`, `address`, `created_at`, `updated_at`) VALUES
(1, 'Parul ', 'parul@gmail.com', '01450215245', 'Dhaka, bangladesh', '2024-07-15 15:00:07', '2024-07-15 15:00:07'),
(2, 'Adiba Tushi', 'tushi@gmail.com', '01475546535', 'Dhaka, Bangladesh', '2024-07-15 09:15:19', '2024-07-15 15:15:55'),
(3, 'Rafid Khan', 'rafid@gmail.com', '01748555451', '11/B Borobag, Mirpur-2 Dhaka, Bangaladesh', '2024-07-15 09:24:16', '2024-07-15 09:24:16');

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

--
-- Table structure for table `core_customer_analytics`
--

CREATE TABLE `core_customer_analytics` (
  `id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `total_orders` int(11) DEFAULT 0,
  `total_spent` decimal(10,2) DEFAULT 0.00,
  `last_order_date` date DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_customer_analytics`
--

INSERT INTO `core_customer_analytics` (`id`, `customer_id`, `total_orders`, `total_spent`, `last_order_date`, `created_at`, `updated_at`) VALUES
(1, 1, 3, 470.00, '2024-07-15', '2024-07-15 16:02:16', '2024-07-15 16:03:04'),
(2, 3, 5, 877.00, '2024-07-15', '2024-07-15 10:20:08', '2024-07-15 10:20:08');

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

--
-- Table structure for table `core_employees`
--

CREATE TABLE `core_employees` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `email` varchar(100) NOT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `position` varchar(50) DEFAULT NULL,
  `hire_date` date DEFAULT NULL,
  `salary` decimal(10,2) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_employees`
--

INSERT INTO `core_employees` (`id`, `name`, `email`, `phone`, `position`, `hire_date`, `salary`, `created_at`, `updated_at`) VALUES
(1, 'Aminur Rahman', 'aminur.isdb@gmail.com', '01789360932', '', '2024-03-06', 22000.00, '2024-06-29 13:57:42', '2024-07-03 11:37:22'),
(3, 'Tonima Tonni', 'tonima.tonni@gmail.com', '0145151554', '', '2024-04-09', 19000.00, '2024-06-29 10:36:28', '2024-07-03 11:49:29'),
(4, 'Tami Rahman', 'taiba.tami@gmail.com', '017894552570', '1', '2024-07-03', 26000.00, '2024-07-02 07:52:52', '2024-07-03 05:45:18');

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

--
-- Table structure for table `core_failed_jobs`
--

CREATE TABLE `core_failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `core_inventory_reports`
--

CREATE TABLE `core_inventory_reports` (
  `id` int(11) NOT NULL,
  `report_date` date NOT NULL,
  `total_items` int(11) NOT NULL,
  `total_value` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `core_items`
--

CREATE TABLE `core_items` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `category` varchar(50) DEFAULT NULL,
  `unit` varchar(20) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_items`
--

INSERT INTO `core_items` (`id`, `name`, `description`, `category`, `unit`, `price`, `created_at`, `updated_at`) VALUES
(1, 'ABC', NULL, NULL, NULL, 470.00, '2024-07-15 17:47:23', '2024-07-15 17:47:23');

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

--
-- Table structure for table `core_jobs`
--

CREATE TABLE `core_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `core_job_batches`
--

CREATE TABLE `core_job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `core_leaves`
--

CREATE TABLE `core_leaves` (
  `id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `leave_type` varchar(50) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `status` varchar(20) DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_leaves`
--

INSERT INTO `core_leaves` (`id`, `employee_id`, `leave_type`, `start_date`, `end_date`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Summer Vacation', '2024-07-03', '2024-07-05', 'Active', '2024-07-02 12:03:58', '2024-07-02 12:03:58'),
(5, 4, 'Sick', '2024-07-04', '2024-07-07', 'Accept', '2024-07-03 11:28:45', '2024-07-03 11:28:45'),
(6, 3, 'Personal Problem', '2024-07-04', '2024-07-06', 'Accepted', '2024-07-03 11:29:44', '2024-07-03 11:29:44');

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

--
-- Table structure for table `core_loyalty_program`
--

CREATE TABLE `core_loyalty_program` (
  `id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `points` int(11) DEFAULT 0,
  `tier` varchar(50) DEFAULT 'Basic',
  `joined_date` date NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `core_migrations`
--

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

--
-- Dumping data for table `core_migrations`
--

INSERT INTO `core_migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1);

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

--
-- Table structure for table `core_payrolls`
--

CREATE TABLE `core_payrolls` (
  `id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `pay_date` date NOT NULL,
  `total_pay` decimal(10,2) NOT NULL,
  `deductions` decimal(10,2) DEFAULT NULL,
  `net_pay` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_payrolls`
--

INSERT INTO `core_payrolls` (`id`, `employee_id`, `pay_date`, `total_pay`, `deductions`, `net_pay`, `created_at`, `updated_at`) VALUES
(2, 1, '2024-04-03', 23900.00, 900.00, 10000.00, '2024-06-30 18:15:18', '2024-07-03 08:03:37');

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

--
-- Table structure for table `core_products`
--

CREATE TABLE `core_products` (
  `id` int(10) NOT NULL,
  `name` varchar(50) NOT NULL,
  `offer_price` double DEFAULT NULL,
  `manufacturer_id` int(10) NOT NULL,
  `regular_price` double NOT NULL,
  `description` text DEFAULT NULL,
  `photo` varchar(50) DEFAULT NULL,
  `product_category_id` int(10) UNSIGNED NOT NULL,
  `product_section_id` int(10) UNSIGNED NOT NULL,
  `is_featured` tinyint(1) DEFAULT 0,
  `star` int(10) UNSIGNED DEFAULT NULL,
  `is_brand` tinyint(1) DEFAULT 0,
  `offer_discount` float DEFAULT 0,
  `uom_id` int(10) UNSIGNED NOT NULL,
  `weight` float DEFAULT NULL,
  `barcode` varchar(45) NOT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp(),
  `product_type_id` int(10) UNSIGNED NOT NULL,
  `product_unit_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `core_products`
--

INSERT INTO `core_products` (`id`, `name`, `offer_price`, `manufacturer_id`, `regular_price`, `description`, `photo`, `product_category_id`, `product_section_id`, `is_featured`, `star`, `is_brand`, `offer_discount`, `uom_id`, `weight`, `barcode`, `created_at`, `updated_at`, `product_type_id`, `product_unit_id`) VALUES
(17, 'Brown Borka', 2500, 3, 4000, '', '17.webp', 5, 1, 1, 0, 1, 0, 1, 0, '4456342342', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, 0),
(50, 'Apple', 345, 1, 400, 'NA', 'default.jpg', 1, 1, 0, 5, 1, 0, 1, 0, '1002', '2024-03-20 09:57:44', '2024-03-20 09:57:44', 1, 0);

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

--
-- Table structure for table `core_purchase_orders`
--

CREATE TABLE `core_purchase_orders` (
  `id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `order_date` date NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` varchar(20) DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `core_purchase_order_items`
--

CREATE TABLE `core_purchase_order_items` (
  `id` int(11) NOT NULL,
  `purchase_order_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `core_roles`
--

CREATE TABLE `core_roles` (
  `id` int(10) NOT NULL,
  `name` varchar(20) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `core_roles`
--

INSERT INTO `core_roles` (`id`, `name`, `updated_at`, `created_at`) VALUES
(1, 'Admin', '2024-03-02 04:59:14', '2024-03-02 04:59:14'),
(2, 'Manager', '2024-02-28 12:10:59', '2024-02-28 06:10:59'),
(4, 'Guest', '2024-03-07 10:24:21', '2024-03-07 04:24:21'),
(5, 'Manager', '2024-03-07 12:25:34', '2024-03-07 06:25:34'),
(8, 'Founder', '2024-07-02 13:55:12', '2024-07-02 07:55:12');

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

--
-- Table structure for table `core_sessions`
--

CREATE TABLE `core_sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `core_shifts`
--

CREATE TABLE `core_shifts` (
  `id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `shift_date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `role` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_shifts`
--

INSERT INTO `core_shifts` (`id`, `employee_id`, `shift_date`, `start_time`, `end_time`, `role`, `created_at`, `updated_at`) VALUES
(2, 1, '2024-07-03', '10:00:00', '19:00:00', 'Admin', '2024-07-01 16:22:30', '2024-07-03 06:41:09'),
(4, 3, '2024-07-16', '10:09:00', '10:09:00', '5', '2024-07-15 22:09:43', '2024-07-15 22:09:43');

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

--
-- Table structure for table `core_stocks`
--

CREATE TABLE `core_stocks` (
  `id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `current_stock` int(11) NOT NULL,
  `status` varchar(50) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `core_stocks`
--

INSERT INTO `core_stocks` (`id`, `item_id`, `current_stock`, `status`, `last_updated`) VALUES
(2, 1, 560, 'Reacived ', '2024-07-15 18:45:46');

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

--
-- Table structure for table `core_stock_entries`
--

CREATE TABLE `core_stock_entries` (
  `id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `entry_date` date NOT NULL,
  `source` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `core_stock_levels`
--

CREATE TABLE `core_stock_levels` (
  `id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `current_stock` int(11) NOT NULL,
  `reorder_level` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `core_attendances`
--
ALTER TABLE `core_attendances`
  ADD PRIMARY KEY (`id`),
  ADD KEY `employee_id` (`employee_id`);

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

--
-- Indexes for table `core_customer_analytics`
--
ALTER TABLE `core_customer_analytics`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_id` (`customer_id`);

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

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

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

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

--
-- Indexes for table `core_jobs`
--
ALTER TABLE `core_jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `core_jobs_queue_index` (`queue`);

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

--
-- Indexes for table `core_leaves`
--
ALTER TABLE `core_leaves`
  ADD PRIMARY KEY (`id`),
  ADD KEY `employee_id` (`employee_id`);

--
-- Indexes for table `core_loyalty_program`
--
ALTER TABLE `core_loyalty_program`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_id` (`customer_id`);

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

--
-- Indexes for table `core_payrolls`
--
ALTER TABLE `core_payrolls`
  ADD PRIMARY KEY (`id`),
  ADD KEY `employee_id` (`employee_id`);

--
-- Indexes for table `core_products`
--
ALTER TABLE `core_products`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uni_barcode` (`barcode`),
  ADD UNIQUE KEY `uni_name` (`name`);

--
-- Indexes for table `core_purchase_orders`
--
ALTER TABLE `core_purchase_orders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `supplier_id` (`supplier_id`);

--
-- Indexes for table `core_purchase_order_items`
--
ALTER TABLE `core_purchase_order_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_order_id` (`purchase_order_id`),
  ADD KEY `item_id` (`item_id`);

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

--
-- Indexes for table `core_sessions`
--
ALTER TABLE `core_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `core_sessions_user_id_index` (`user_id`),
  ADD KEY `core_sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `core_shifts`
--
ALTER TABLE `core_shifts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `employee_id` (`employee_id`);

--
-- Indexes for table `core_stocks`
--
ALTER TABLE `core_stocks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `item_id` (`item_id`);

--
-- Indexes for table `core_stock_entries`
--
ALTER TABLE `core_stock_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `item_id` (`item_id`);

--
-- Indexes for table `core_stock_levels`
--
ALTER TABLE `core_stock_levels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `item_id` (`item_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `core_attendances`
--
ALTER TABLE `core_attendances`
  ADD CONSTRAINT `core_attendances_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `core_employees` (`id`);

--
-- Constraints for table `core_customer_analytics`
--
ALTER TABLE `core_customer_analytics`
  ADD CONSTRAINT `core_customer_analytics_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `core_customers` (`id`);

--
-- Constraints for table `core_leaves`
--
ALTER TABLE `core_leaves`
  ADD CONSTRAINT `core_leaves_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `core_employees` (`id`);

--
-- Constraints for table `core_loyalty_program`
--
ALTER TABLE `core_loyalty_program`
  ADD CONSTRAINT `core_loyalty_program_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `core_customers` (`id`);

--
-- Constraints for table `core_payrolls`
--
ALTER TABLE `core_payrolls`
  ADD CONSTRAINT `core_payrolls_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `core_employees` (`id`);

--
-- Constraints for table `core_purchase_orders`
--
ALTER TABLE `core_purchase_orders`
  ADD CONSTRAINT `core_purchase_orders_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `core_suppliers` (`id`);

--
-- Constraints for table `core_purchase_order_items`
--
ALTER TABLE `core_purchase_order_items`
  ADD CONSTRAINT `core_purchase_order_items_ibfk_1` FOREIGN KEY (`purchase_order_id`) REFERENCES `core_purchase_orders` (`id`),
  ADD CONSTRAINT `core_purchase_order_items_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `core_items` (`id`);

--
-- Constraints for table `core_shifts`
--
ALTER TABLE `core_shifts`
  ADD CONSTRAINT `core_shifts_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `core_employees` (`id`);

--
-- Constraints for table `core_stocks`
--
ALTER TABLE `core_stocks`
  ADD CONSTRAINT `core_stocks_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `core_items` (`id`);

--
-- Constraints for table `core_stock_entries`
--
ALTER TABLE `core_stock_entries`
  ADD CONSTRAINT `core_stock_entries_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `core_items` (`id`);

--
-- Constraints for table `core_stock_levels`
--
ALTER TABLE `core_stock_levels`
  ADD CONSTRAINT `core_stock_levels_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `core_items` (`id`);
COMMIT;

