-- Host: db-master-0.internal    Database: ecommerce


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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$XSF8UtW3AlLFSTsYPpRgGISuu4wx.pktRevxluqsUbyFrGHAFEvgh','user','ak_a2c2f200235e0bae','2023-08-28 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$LUyXYlQB5ct9e5XcqKZiYOu0PsZSxpjwh092vUJM73e6S7uZ3wiyo','user','ak_f1035ba06cbcdd0a','2023-07-26 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$pMBw/JToocBw8yAlSEwrOywLps1r1qhpttOJqyDTn7wpRTzJg/2qg','user','ak_94ecf77a46fe614d','2023-03-24 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$edE8nlLMDl51ATMmoRiwBRMf/13XJC6XA42W1yxjJmUvpmL74p5BM','user','ak_fb7562b1b2622197','2023-06-17 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$J3ol01zK61iGush8Fxvp6Ik/hwyoj2Z/t5IHM6ePk64rzsuLvUWWv','user','ak_f60d5ca112e20f1c','2023-02-27 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$bMXvMVOwLkkVza.cgRzZCiEvSQXVEhzUynom2t67GSCJjp3q3np6b','admin','ak_e0638a606d2139fe','2023-01-24 10:07:00',NULL);

