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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$RVYhsTSmbuWTD/Kp6aYg7SwsdraOxHnlnHbK/QE.SqaB21xWd3M/5','user','ak_60d93f4ea603b508','2023-03-21 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$4UolRZBzZBvGep7fKbn6riNk3TrJrnVP.rFpReeO8UsO4rA0Srl2u','admin','ak_4a110ea62ee53131','2023-05-23 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$IgfiuQiRdpTWkDg2NJ0QutyC6CbrpuuNY3Ub9LooDESf1O2xioQgw','user','ak_6107b4e4630bc963','2023-06-13 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$B4hyX6uEvv0G/0zVbhfPTX8dQdFzN9AqDMP7T7yRbnAcY6Bkttgiw','admin','ak_2240cf42f7eb2ee2','2023-01-02 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$Y7FwnIZW9xD7r/Yyslc1wmtPYGksE0.R/2FK0.DL2toXEunooT5Eb','admin','ak_9f9eadef0790d896','2023-07-21 10:11: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=32639;

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


