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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$HJvIRSBetRMtnIF4DpMOjecXIudDxty2sk3D3vWT2PXTNnLMzGs/l','user','ak_c2c525a7da0503af','2023-10-02 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$Cp.ba.l/IaUv3e5h388oSDU/OdWh10XYi9BcEvskCurd3XNkSh1J/','admin','ak_4cd8b089d7b32ecd','2023-12-01 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$LhqepNBWwlvz0SFmZ0VZ8KyE58OBAGH/9IWBD7V/LIMylhc1/Lige','user','ak_53740834b18a8a8e','2023-01-13 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$JKOcZHCEUS4cUmUW2qZuMtYx5a57klt2orelYqUkh9DUUsI5uNBqc','user','ak_cd3d19b930ba131f','2023-07-14 10:21: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=21059;

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


