-- Host: db-master-8.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=27409;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$FVs5j36I5eobDBK0RBNbOweTfNGkXHdAaygwtW7nEqe8KonDL7toJ','user','ak_53fae0e9ba5c0b20','2023-12-12 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$2va8qP.KvnpkSZfIWtgPY5gn5xRZSG3XjhGuQTkiwaFYriqovjkGj','user','ak_1b58795b2e9c91cd','2023-11-10 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$BImcOwt8mYGO0mRMPXzZ0NBJAvtkGbAXeGF.4ba.RxFrfa5J3jkYP','admin','ak_f2c4d119feac8d59','2023-02-21 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$xe17vXJK1G.UmHmgrBZ38zawGnML4q6XPJeCDWrBI7FHIb8pxIo..','user','ak_dbd3043465f7d2d2','2023-04-03 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$ikMaXJPhdh9fPXpDZsVAHQGQUxom9G2WGXJHkP/AyT6wDvz/tp3.G','admin','ak_9ac4e8440165eab0','2023-01-05 10:03:00',NULL);

