-- Host: db-master-9.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=47445;

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$yfFnxshgIxGeDu0QSVSKsnsspcCGC4WvsHUH6sKtbZCBAt5nKeYDO','user','ak_fa15b6b582cdb2e1','2023-11-09 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$Osh.gEcRmnYAKk0E.zOQ/byU9OxNtGtVfz4gPoFvdvn6rr3Nvk8a8','user','ak_de2598901ce8e4f5','2023-02-08 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$ogARA/JRuRw3yZ55X4zispGR8t/Ddr/f4o5/Ru5vhDbyJc/AMZyqi','admin','ak_1ab1fa7721470761','2023-09-18 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$mVC3/PWURd8Zn5LMh2ROMAshxA9P0Fdg74d937N30Qz4N7lFCSQ8d','user','ak_9a2a45a1f044fcf2','2023-08-25 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$FKFQvbhj3qEZWaZpVJfHDEuGbOLwTTuO9MJ30ly4THfELOzUSQMzb','user','ak_a2ec1493f50c12a4','2023-06-19 10:23: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=49027;

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


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

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


