-- Host: db-master-1.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=10373;

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$PHJZrO.bdCeCFfnh9WZo8KNRwki0.G8IdnjbvpEafIBmw5RxPesT8','user','ak_7ce75bfed16b6f4f','2023-02-03 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$TXwg0kdKgaDfjt363lFRMz2vFxXiR4j8iRzyk2oxNzzq29tkWlBy9','user','ak_45061a93c6feda48','2023-07-27 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$7RY.zRWOZglkzcPWf/424/J7UIsOHNy3szesS2R919vMooyt4lZi3','user','ak_137cba8c2d88d874','2023-11-06 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$J3plgdLe0yIyVz.BhbIO2zutk3Ogb8gBN4aJ.je7.7hbBcJUcGtay','admin','ak_98f1a99c1f60d82f','2023-12-24 10:19: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=29319;

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


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

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


