-- Host: db-master-9.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=44743;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$VrUDqZwmDvkbAJUPaB5RF3edLUkxHFa27xW4gbrfbFM09gUpLu5nO','user','ak_9727e8b45bdb092a','2023-06-14 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$L0vtVRJB6FLsKdEGW4R.OIJJ6EVMFANHupikLL4RumTxmPcWj.IeN','user','ak_38a4c7a0366656f3','2023-09-11 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$WE1eIMf8frctbYhl7uqmbsHU/t92kpluKiF3x3xlFUl5TcMexoRcD','admin','ak_ebd5105998d43ff0','2023-10-28 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$XvvrhV.2K474.BC6vn3t.FZhMdnqdls9pmkkP3O0NjWyDDsNZigcz','user','ak_3a76668f4aabc0b8','2023-09-10 10:23: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=41257;

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


