-- Host: db-master-2.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=45288;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$HK64vuodQqVnjElpCHT/G2Y3mZz6Ox3SXsCHLuVPZDT/kNSy.KdcE','user','ak_40e8c95d9fc5c751','2023-10-02 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$QGQbQ48OHO9DbgTPMXCKB6lSxy4BKpjOPZqtmSKhKisuuEZUiEGAX','user','ak_2f70dd041b8b694b','2023-08-04 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$3TQVDaaoIhsuSOW3mEzcpAnCRlWgEIESdjZPM89Vn087BQwqY9Lar','user','ak_521353c4c8ded58d','2023-02-28 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$aIAlEDPu.2n4FqZD2MiqWQhzaYIRV2gJG.L4GEPhKQeAImHP8ih6e','admin','ak_715167b3ef15fd14','2023-07-18 10:14:00',NULL);

