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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$bu0DcDhRKs.ifssVllAmLKPvhR98SZXZxQGD7d/8EdI3iGY7tcTgL','admin','ak_2769d33e09fc5e30','2023-11-05 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$lZr7d6Yqs4T6l8Nj4eX6uF0WB0Mz4lUF2tU3XstKgzW7OoUwFPf4W','admin','ak_b225def2f04928e4','2023-12-20 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$O4K6qFAP5EEHtXEKyTMII3rWc.xO.dB5sFnVtpp3fW9T2TehkkX62','user','ak_a675c870c045e71c','2023-02-17 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$xzLfHzGfOW4a3OKMVb6qStcafNHfhtMw9DT8Z2YkjaaZcFeMgZ/hQ','user','ak_fd9c1c34bf2c3e2b','2023-08-20 10:04:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=41510;

--
-- Dumping data for table `sessions`
--


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

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


