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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=2176;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$ebT9HWa10Jj2mzymGragGdwfz.ywPeIFu86EkOSjnRgV1KWrUuhcz','user','ak_8a57664220b33ee7','2023-05-18 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$c6ISRI6aciaj.L3OfYsqp978MQ2wZnXQL/bEXd83i6b88pFE.jgDZ','admin','ak_d6fadcf5eb6dbf09','2023-09-06 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$ezqEM2lgpK3UPdqsaUfbXCcqgcz4XS/5CQhnPSKZeHGQj/jWqrHLs','user','ak_6d67df19463f8286','2023-08-04 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$U3Gv0.DZ5OS223pUF61R3pqKPmxv8Xqk2RvcVVr21ni/jCJPrqdQA','user','ak_2dee44ab0ad5f3b4','2023-12-23 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$x5yE3BOUkEdSRhzNMU/a08zTvsf0ODi.pcoZaZYHM.YAF493i4kqD','user','ak_da9909f999b8147c','2023-03-04 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$YxUq2EdQEXdGhWeQvtAUuOHCoMmsmx8iUFkFPMAVkDwEZoJJI2125','admin','ak_a0ba0b99694d5cb7','2023-01-12 10:18: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=33165;

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


