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

START TRANSACTION;



--
-- Database: `hgagent`
--

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

--
-- Table structure for table `promoter_task_list_products`
--

CREATE TABLE `promoter_task_list_products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `remark` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `promoter_task_list_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `promoter_task_list_products`
--
ALTER TABLE `promoter_task_list_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `promoter_task_list_products_product_id_foreign` (`product_id`),
  ADD KEY `promoter_task_list_products_promoter_task_list_id_foreign` (`promoter_task_list_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `promoter_task_list_products`
--
ALTER TABLE `promoter_task_list_products`
  ADD CONSTRAINT `promoter_task_list_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `promoter_task_list_products_promoter_task_list_id_foreign` FOREIGN KEY (`promoter_task_list_id`) REFERENCES `promoter_task_lists` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

