-- Host: db-master-4.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=16361;

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$fYYbj5jVvH4LnP0F1742Or5OPL6ECfju8H1tmYSviwqM0MW3O18x6','user','ak_e444ef1bd031eb92','2023-07-26 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$yAsIueJ7Ad8FjttsdW2J5BeEkTUNv9iL6IYyFAZ3G..TqvNpEBobh','admin','ak_9de0e2716f53357d','2023-08-27 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$bf4Gf27Oo5Bxhrk4Ss.CWFWRtKltkqYemXofEMfF/obgFn0RFHygA','admin','ak_98170627fe4426d7','2023-09-08 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$1CSD03pYLB4rKb1oJfZIo/XYzc5jC3gpWMpGuf.k.dXtw/Ir6iP.x','user','ak_c319fac181e968bd','2023-09-20 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$ZTKrfoj7QGUlDID6KjI1Jz55v2hhG1rSrC/jijWoYhMVsncYndR7Z','user','ak_9ce186c3168fe7a7','2023-10-18 10:12:00',NULL);

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

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


