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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$uGGMq0ii8.2R1Sq3BvLvoaiEutR5FEclNVUdY5TVWjgbpSA92OlJb','user','ak_db432a13f471e0e6','2023-07-10 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$KyYKMB1nc19OzBNVyn8JrsL9QyUOsJ2bLp6CNkIIDkZmyjujkp4IK','user','ak_525aa24d5a429df1','2023-02-16 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$BOahJKYk/d7bNsG/eEmlMTRMqvzC9I9ftAAPDZUmM7YbP1/PUK9kg','admin','ak_49e258f17110382f','2023-06-25 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$3Wo6HBI/LoCCmnvLvvBNYlah8Sq9DaGjiLVPQceC.nKmklhcGXYEY','user','ak_45ff963a844ca760','2023-11-09 10:23:00',NULL);

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

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

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


