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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$kJz5GzeUDG9ho9cD2qiugj616PcMzqwzHaR/hZ9ydGwLw6CdJvSla','admin','ak_19d46621d3fcfcb7','2023-05-20 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$Z.jlqUTQLDefL43Xki4KGiaIS.bifd6cb.H7VK6oSRafkbDNHTHtK','user','ak_3097435d9dfb8324','2023-02-19 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$aBNsrYMGDhPZG54PQ3xBia1IfIIFWz9M1MkOJegivr4tsGUzheeRC','admin','ak_7c2967e205cbac13','2023-02-13 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$IMb2IiYIwExzSmj9lyDmPf.zG9dCWj4QdWVnlnDmA2FUE8p.4z/gD','admin','ak_796dad507486e7c7','2023-05-21 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$RizPJPstIQgIE5O4u4b/cIaBELK3kKqxDA1KeHrmGBOySxb0XFPaO','user','ak_e52d8192ddeb9b30','2023-02-13 10:11: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=36173;

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


