-- Host: db-master-0.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=5538;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$fEWxWrPDvlqOVdqRumUrzzf9Nqs/dRSEOXkSLbzct3U68kuBMN589','admin','ak_8c4603c5d7f63e3c','2023-01-27 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$LaQq.N.V7XflHX42CdYLNWreqAFVwk90W/3cpvcBoNUhVJ2nqX2FF','user','ak_b0e2c8a25da1b8b7','2023-05-10 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$Y5nKe5Adx/vquiBcTnu.OWFwY2uzSgS34EKnkg2bzKVxDCdA5YYrf','admin','ak_6990a02aab774009','2023-05-17 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$48isAVawvuSn0JLNWkpw438lyklNeZSeVx7FlyiaWCjELtF809j0E','admin','ak_671b8b6a1f9f4560','2023-04-01 10:02:00',NULL);

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

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


