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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$zVMJH76ur6Bg83v1eqPVJsf8qh.44YVXWd1qwzh7S6TCLZIueSMbs','admin','ak_4c21af05372ed40c','2023-12-14 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$cQbDL7Q6ruwuTv5OF31iXfdLozPcNnWQJQ4u/aztlFbEcphUix8SO','user','ak_8e5eefdef67ae22b','2023-05-26 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$3D4rxz0go6UyK1M3XPUXGfORRaNqPkhuX8p0KWQLaGXLoQPIMbmN/','user','ak_2257c866b4ffaec4','2023-09-05 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$tjKynsGGR9OJmtcQfvbFYa0ltZIZ1Q4IUFTo6PxzK.YLhw7HEqBIc','user','ak_ac0cf6b6a605670f','2023-02-09 10:07:00',NULL);

