-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               8.0.29 - MySQL Community Server - GPL
-- Server OS:                    Win64
-- HeidiSQL Version:             11.2.0.6213
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

-- Dumping structure for table hgagent.product_time_entries
CREATE TABLE IF NOT EXISTS `product_time_entries` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `o_qty` int NOT NULL,
  `s_qty` int NOT NULL,
  `b_qty` int NOT NULL,
  `clock_in` tinyint NOT NULL DEFAULT '0',
  `clock_out` tinyint NOT NULL DEFAULT '0',
  `remark` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `product_id` bigint unsigned DEFAULT NULL,
  `time_entry_id` bigint unsigned DEFAULT NULL,
  `promoter_task_list_product_id` bigint unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `product_time_entries_product_id_foreign` (`product_id`),
  KEY `product_time_entries_time_entry_id_foreign` (`time_entry_id`),
  KEY `product_time_entries_promoter_task_list_product_id_foreign` (`promoter_task_list_product_id`),
  CONSTRAINT `product_time_entries_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `product_time_entries_promoter_task_list_product_id_foreign` FOREIGN KEY (`promoter_task_list_product_id`) REFERENCES `promoter_task_list_products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `product_time_entries_time_entry_id_foreign` FOREIGN KEY (`time_entry_id`) REFERENCES `time_entries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

-- Dumping data for table hgagent.product_time_entries: ~30 rows (approximately)

/*!40000 ALTER TABLE `product_time_entries` ENABLE KEYS */;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
