-- Host: db-master-4.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=1188;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$yfHaeLGflMrkBwEhh0KLBDCd8m4hc3xjcP/4DjwfZM6NnQIZF6/gU','user','ak_9e925c945f95dd86','2023-01-17 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$B4FCS93fjORjVhdtzUxehmizf3SyA7H3VKnXNoj9ioJNdbxyG1181','admin','ak_5db8f3c3cda815ca','2023-08-16 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$AZQekwnOVoo6tCEMKlHjRUjQYErIwBkaF2bgCFtWujk6bNA0bZu5O','user','ak_22fea925f8bb4d30','2023-02-10 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$82o1nDOwJAZ6V7bMEYW/IkUdZzG.nU1RNIzNj2ok7aOLF/YMHObA9','user','ak_4e91ea4a0b65e0b9','2023-08-19 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$c5AYNgI6EHqcN8Ly4.0aD3NJdseXbACE/6kejyX5EpeG6O9M7AbJO','user','ak_8d95b88295bfea84','2023-05-17 10:21: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=21769;

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


