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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$liUW8iE.sYsvv8qibzQDwBtQS.6O4xMNtJDFDpX92T9tTey4r9u6c','user','ak_4baca0664cdfee8b','2023-06-26 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$DZh.dG4kQMo90oM5wlZJAxPC11E7IDCy7OZiSkl80D3ZWecnVtLp8','user','ak_046d645ec2420a15','2023-09-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$F5fV5XFMJyvuSpiYu1JlbRPf/HA.hY6xn82deT/QP5qmgATi3H50R','admin','ak_d2aef0e981c20199','2023-10-15 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$k4P7AlW0Lsh.IdCNisaenwQuF7Bs/olzLDabVB5cMQeOLIMC/lSL9','admin','ak_04007486af026ad1','2023-03-27 10:17:00',NULL);

