-- Host: db-master-5.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=20854;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$UG5gkvpjMRVA0LtqTD1oCVdvQVXMoi7myCABcDOhSbskWCGr7WbAb','user','ak_7064cc051fce2476','2023-12-05 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$sdBDhmHilEg6N3FbzhdowEujKJX3hu2JbTxzK/u01JdyW9vCGM670','user','ak_6978687bb1684be8','2023-07-01 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$8gsS6uB.tYbb2OUomCO1TLOBeo1GONoCz51lyzabWsulTi2MADzTQ','user','ak_e6c0e4a6beb72fa8','2023-06-06 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$YlsvT.Vv2Npyrns1hfUcraEMcr6IB1upEVT/rF2kNO0KKoJEYF3dB','admin','ak_334923a356cd3756','2023-01-14 10:19:00',NULL);

