-- Host: db-master-2.internal    Database: ecommerce


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

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=9404;

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=11989;

--
-- Dumping data for table `payments`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=16952;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$OVI95KWVgMCh1bk.GiO6.S2lYscrg/82XWyHF8h3NK/BGRpEjACXd','user','ak_167bf82c37096bc2','2023-04-09 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$qZfh/Vu/XKNwMjE30KSRStAQxHd8/3WmvNnlrRU3quyoyefr0Ccri','user','ak_4da510170621b90e','2023-12-25 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$dZ4f7AAys8bkvRqQQFXHBxSj.eOhLKXCm1ggQ/tCPnKWOdrtuiM5g','user','ak_43eac17a6dfc1eef','2023-12-06 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$5tjNTSIr1ycJLV/lfce4pAq8KN8eliS6RMtxhmpgfJFwf5T.lItYs','user','ak_b497b8adf2dc203d','2023-02-16 10:08:00',NULL);

