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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$VALdosh/IBmRJgt08QJJ91fCt4qCvr4FPRVyBgJ2c8RnLK48fCk3i','admin','ak_2b6d722ebbee9dfb','2023-04-11 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$kpKlTIQ5DBYQglC8.OuA2KCWhmOSjGcoxG/ig5PTPvhJRQ5DxYQLx','user','ak_037fecb62f4e142d','2023-01-19 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$jHc3.qgYh.7NhxNKSKnM1W3HpMEkHzdyxdr0C5c/KNOdpFjnW8SPc','admin','ak_b9d64de8f70cc708','2023-10-22 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$xUWMFw2yTF5z8hZFncHQurPcEGx0Xvrz8TPJK7neLEKW9N0.DyKjD','user','ak_ba3555c66a295c28','2023-12-05 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$rgY3KICApHh1DH2WKIGGwLLZduMGbO7LQWwBtyaWq.zIZCVIQOV/E','user','ak_0f853ed1550460e8','2023-03-08 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$y/R9hIOt5ER.I4Y.YPW/qfUYMAdd.CzOHMYQcoCtg.9dgGiOWx0J8','user','ak_b3f9643213cedd03','2023-08-22 10:17:00',NULL);

