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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$WK7xdAq7jKPSXZylHDjsi36Eh8Ru.sMc1zpb/8f7BFUPU0AUR3sE6','user','ak_5d7404f9e7a98ce7','2023-11-20 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$lpa0DUmhDsJmUFqAC3TOzJUKBVXSDE7n3nGgfqELKALoizb6MD/Ez','user','ak_2593d3c3dce0d779','2023-08-13 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$YdJ2h9YXRZGfEyJH1BHAWRTq2xG59tWgpqdo/7VObU9hKLejNxOcv','user','ak_30cce05810ac69cc','2023-12-28 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$sqbGCDL79Bezhsvmx01eY0bF.wJ0e.EvhdQUkX/7f5wgWnn8QWIHj','user','ak_bb7e8c29d6a9d478','2023-01-07 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$krYWUcF9VM5.g5Q1xZtCB.dKLPUjGIL7LszN3eX1XpoAt4puvg3rq','admin','ak_fdc5039806c6213c','2023-05-07 10:03:00',NULL);

