-- --------------------------------------------------------
-- Server OS:                    Win64
-- HeidiSQL Version:             11.2.0.6213
-- --------------------------------------------------------


-- Dumping structure for table hgagent.invoice_items
CREATE TABLE IF NOT EXISTS `invoice_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1:Product,2:Service',
  `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` double(10,2) NOT NULL,
  `unit_price` double(10,2) NOT NULL,
  `tax_price` double(10,2) NOT NULL,
  `discount_price` double(10,2) NOT NULL,
  `amount` double(10,2) NOT NULL,
  `position` int(11) DEFAULT NULL,
  `taxable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:false,1:true',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `invoice_id` bigint(20) unsigned DEFAULT NULL,
  `product_id` bigint(20) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoice_items_invoice_id_foreign` (`invoice_id`),
  KEY `invoice_items_product_id_foreign` (`product_id`),
  CONSTRAINT `invoice_items_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `invoice_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

-- Dumping data for table hgagent.invoice_items: ~0 rows (approximately)
DELETE FROM `invoice_items`;

