-- Host: db-master-3.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=1464;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$mzSu7utKeASLw5sbAlIFXJpRsgFtJHcZZfr83xGg6/eaAeDvz1FSh','admin','ak_e6025833154acc46','2023-07-25 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$BAolAFUSSSlMkcYdvcYSVJbdKKQa1SPxkAWDfQZDgV3lyrSDG0ku9','user','ak_7abac54b2cb5ed14','2023-08-27 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$LAtKpGem8OeDuqy.EEBb5aKdqRwsdEnknOJzi9fdUxe8X/bZy9XJ4','user','ak_242d99b187e00d47','2023-07-13 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$t.OoKPKNRYZfFROdIduxpV5TKgrbsHHcZSSYD6Mbde/BtPg89PipP','user','ak_459c9a0fd367a3ee','2023-03-26 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$f6hT4cCzi/tmU.TCmX8m2AESIFbqmLrFSigjFoTLfXz97OQip2dF8','user','ak_387b56d919fc9fe6','2023-05-05 10:16:00',NULL);

