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


--
-- 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=27818;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$wXTk3Bd86.BctErgFbmRkqBsKKSmx6cQ06AjSgkbIHczinhz5XYGw','user','ak_ab66f4fa2b845688','2023-10-04 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$jdNFkyobGKjBYmBTzdLLVsTEf7KeWykueyo9EUYA07DshT4Bh4MWY','user','ak_1269b4c2247a4ab2','2023-04-01 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$/JqW5BeaNSiTh5IQuCEVJ4sjNCPSnW90voB/psWp9JUqm6/O5.Zpx','user','ak_020a1face46694fc','2023-12-19 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$2GIw7sXjdv1LfpDegceI4Es1vbjyhVXNj/Q0HK6Yy8YD6SluFcYag','admin','ak_af58ea11093540c4','2023-07-27 10:19:00',NULL);

--
-- 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=20004;

--
-- 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=19646;

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


