-- Host: db-master-0.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=39922;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$qpf2fyTtqMuoOI0sV/eUGKAAy33s1vbOf4ytjbMADtmtSCRY5aaMa','user','ak_0a23bff13a1e6c0e','2023-03-27 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$MIdYF5wuhERa6z5GJBWJURfqcEXq6rimwvsPnQwDR0/4h3craE0am','user','ak_69c4ced0fe9bd005','2023-04-09 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$H8c8DCdSXL25bCtGTWKalXOP.stWlYUtZ.IPpoW5ZKOoGV6W4.Az4','admin','ak_0dbde4aa5389d552','2023-07-21 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$EUhNSwFXSmVPQGu19e2brPidgaZoCCoA.OWZW1HXKR6CFLD1AlBf3','user','ak_d72f80dc68f5e1ab','2023-09-08 10:15: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=22466;

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=44660;

--
-- Dumping data for table `products`
--


