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


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$KZYN6qaTQdRD6yIbhOcvEjmi6.RUTN.lrJV7QQZDNhEc4SBmF.oKo','admin','ak_af698562579e97bc','2023-09-23 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$9jFBjOkuf9IVq8wjaZirRxnmVUB0LUYX4mi6AXZpm5Sa9xRvQv7zY','user','ak_f228e72001aa3b66','2023-05-08 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$bRSTZTk8iN4SLLQiqsBnGsalXnkXzH6ho.PpO4Bu3oh1uj23mVIoc','user','ak_365fea34254e87c2','2023-04-28 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$JSa783HsqIPUz23Ndx2eOD7Y1VwVBVLVuF.Pt6piLnPFyh8GzniRB','user','ak_b8d8c01098e6f06a','2023-04-27 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$ZnIp9j5SsUzpU2/q.rF.SfUtP.y2kEb.MfhAZiC0wpgBPLAJMRpsJ','admin','ak_499f68e473d37ea2','2023-04-18 10:12:00',NULL);

