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

START TRANSACTION;



--
-- Database: `nstore-test`
--

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

--
-- Table structure for table `carousel_images`
--

CREATE TABLE `carousel_images` (
  `id` int UNSIGNED NOT NULL,
  `sort` int UNSIGNED DEFAULT NULL,
  `image_path` text,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

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

CREATE TABLE `migrations` (
  `id` bigint UNSIGNED NOT NULL,
  `version` varchar(255) NOT NULL,
  `class` varchar(255) NOT NULL,
  `group` varchar(255) NOT NULL,
  `namespace` varchar(255) NOT NULL,
  `time` int NOT NULL,
  `batch` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `version`, `class`, `group`, `namespace`, `time`, `batch`) VALUES
(1, '2023-10-05-131354', 'App\\Database\\Migrations\\User', 'default', 'App', 1717385213, 1),
(2, '2023-10-17-103746', 'App\\Database\\Migrations\\Stores', 'default', 'App', 1717385213, 1),
(3, '2023-10-17-104737', 'App\\Database\\Migrations\\Products', 'default', 'App', 1717385213, 1),
(4, '2023-10-17-105549', 'App\\Database\\Migrations\\ProductVariants', 'default', 'App', 1717385213, 1),
(5, '2023-10-23-022717', 'App\\Database\\Migrations\\ProductImages', 'default', 'App', 1717385213, 1),
(6, '2023-11-15-093818', 'App\\Database\\Migrations\\PaymentMethod', 'default', 'App', 1717385213, 1),
(7, '2024-03-29-084140', 'App\\Database\\Migrations\\CarouselImages', 'default', 'App', 1717385214, 1),
(8, '2024-06-03-031132', 'App\\Database\\Migrations\\Posts', 'default', 'App', 1717385214, 1),
(9, '2024-06-03-033232', 'App\\Database\\Migrations\\Posts', 'default', 'App', 1717385611, 2);

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

--
-- Table structure for table `payment_method`
--

CREATE TABLE `payment_method` (
  `id` int UNSIGNED NOT NULL,
  `sort_id` int UNSIGNED NOT NULL,
  `payment_code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `currency` enum('IDR','USD') NOT NULL DEFAULT 'IDR',
  `fees_type` enum('percent','nominal') NOT NULL DEFAULT 'nominal',
  `fees` int NOT NULL DEFAULT '0',
  `image` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `info` text,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `posts`
--

CREATE TABLE `posts` (
  `id` int UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `posts`
--

INSERT INTO `posts` (`id`, `title`, `slug`, `content`, `image`, `status`, `created_at`, `updated_at`) VALUES
(5, 'PROMO 6/6 SUPERMANTAP', 'promo-66-superm-VEq5yH', '<p><strong>SUPERMANTAP</strong></p><p><br></p>', '1717513178_2b9aeb112448c3480386.jpg', 1, '2024-06-03 15:39:24', '2024-06-04 21:59:38');

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

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

CREATE TABLE `products` (
  `id` int NOT NULL,
  `sort_number` int DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `hide_price` tinyint(1) NOT NULL DEFAULT '0',
  `price` int DEFAULT NULL,
  `price_discount` int DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `badge` varchar(255) DEFAULT NULL,
  `time_send` int DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `og_image` varchar(255) DEFAULT NULL,
  `image_width` varchar(64) DEFAULT NULL,
  `image_color` varchar(64) DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `other_field` varchar(255) DEFAULT NULL,
  `must_field` tinyint(1) NOT NULL DEFAULT '0',
  `type_field` varchar(255) NOT NULL DEFAULT 'input',
  `default_field` text,
  `store_id` int DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

INSERT INTO `products` (`id`, `sort_number`, `name`, `hide_price`, `price`, `price_discount`, `category`, `status`, `badge`, `time_send`, `image`, `og_image`, `image_width`, `image_color`, `slug`, `info`, `description`, `other_field`, `must_field`, `type_field`, `default_field`, `store_id`, `created_at`, `updated_at`) VALUES
(1, NULL, 'Youtube Premium', 0, 30000, 10000, 'Hiburan', 1, 'fs', NULL, '1717494578_0898eb75ef98dd93ff88.webp', 'youtub665ee33296783.jpg', '80%', '#000000', 'youtube-premium', NULL, '', '', 0, 'input', 'Data diperlukan A:\r\nData diperlukan B:', NULL, '2024-06-04 16:49:38', '2024-06-04 16:49:38');

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

--
-- Table structure for table `product_images`
--

CREATE TABLE `product_images` (
  `id` int NOT NULL,
  `product_id` int DEFAULT NULL,
  `sort_number` int DEFAULT NULL,
  `image_url` text,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `product_variants`
--

CREATE TABLE `product_variants` (
  `id` int NOT NULL,
  `sort_id` int DEFAULT NULL,
  `product_id` int DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `info` varchar(255) NOT NULL,
  `price` int DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `product_variants`
--

INSERT INTO `product_variants` (`id`, `sort_id`, `product_id`, `slug`, `name`, `info`, `price`, `status`, `description`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, 'Individu-kWYpnn', 'Individu', '', 10000, 1, NULL, '2024-06-04 16:49:38', '2024-06-04 16:49:38'),
(2, NULL, 1, 'Family-JTB5us', 'Family', '', 12000, 1, NULL, '2024-06-04 16:49:38', '2024-06-04 16:49:38');

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

--
-- Table structure for table `stores`
--

CREATE TABLE `stores` (
  `id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `title` text,
  `favicon` varchar(255) DEFAULT NULL,
  `title_home` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `description_home` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `cta_home` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `phone` varchar(32) DEFAULT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `instagram` varchar(255) DEFAULT NULL,
  `template_greet` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `template_order` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `btn_order_type` varchar(255) DEFAULT NULL,
  `og_theme` varchar(255) DEFAULT NULL,
  `og_main` varchar(255) DEFAULT NULL,
  `license_key` varchar(255) DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `stores`
--

INSERT INTO `stores` (`id`, `name`, `title`, `favicon`, `title_home`, `description_home`, `cta_home`, `phone`, `facebook`, `instagram`, `template_greet`, `template_order`, `btn_order_type`, `og_theme`, `og_main`, `license_key`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Tokonata', 'Toko Digital', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'area', NULL, NULL, 'J6jXNiisjaLc3S7vpdKxjFXca0VZvvtV', NULL, '2024-06-03 10:45:05', '2024-06-03 10:45:05');

--
-- Indexes for dumped tables
--

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

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

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

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

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

--
-- Indexes for table `product_images`
--
ALTER TABLE `product_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_images_product_id_foreign` (`product_id`);

--
-- Indexes for table `product_variants`
--
ALTER TABLE `product_variants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_variants_product_id_foreign` (`product_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `carousel_images`
--
ALTER TABLE `carousel_images`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `payment_method`
--
ALTER TABLE `payment_method`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `product_images`
--
ALTER TABLE `product_images`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `product_variants`
--
ALTER TABLE `product_variants`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `stores`
--
ALTER TABLE `stores`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `product_images`
--
ALTER TABLE `product_images`
  ADD CONSTRAINT `product_images_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `product_variants`
--
ALTER TABLE `product_variants`
  ADD CONSTRAINT `product_variants_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

