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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$uYLhtMrqkWTUaREKqsTL3dstbBTv8L2lpRPG2A5n2jYx1IBGH.KXv','user','ak_cef0ad0f5aa3d728','2023-05-18 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$aIZSFL2hbZHM4r5sqkru9OxmkJ72TTan/nq5kFubfgPGPihFnPq1Y','user','ak_870ffbae044db1c9','2023-06-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$ImB7KFuJ1dvfHgGexbGAxeJ7eTCldwoxe.3is2W8c/mV9rmiWh1./','user','ak_673d59465fd2d81e','2023-07-01 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$AI8DHOmWDmKZ2zio1e7INatmZZjf66nO5Ocr/3JmOV5xqYqrpFexa','admin','ak_63f58a5739fe16f2','2023-02-23 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$6HEy6oFnFwzWSmVWFvjaHw2UeS7vyl3NEj7KdQ6/IK9NyPjqOdGAV','user','ak_5e594d75a9952a6f','2023-02-04 10:15:00',NULL);

