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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$M2UdSi7Ajadz1.hA9mtu/rdvCj4oU97jD1A74Uh4siiNveuEto14J','user','ak_d949d15bf3f071ea','2023-06-16 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$1QUZMqzywcqGoN3BNtgA4ltN1QcBfDVeF7.WKSo/GzbiPaF3uRYCX','user','ak_793dac0105b02d48','2023-08-12 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$3jjv0DO70qA/275br2TLnpw3jV4uDRLCDYegwOX6xn.fsJX7sMqBG','admin','ak_fee0fda91553ae52','2023-04-27 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$Vu38IQyZH5QfoKBeBydrub24LvZrgK2ISH4fjRapPrYufOqco1RFk','user','ak_5c09bcd0430ac006','2023-04-11 10:22:00',NULL);

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

--
-- Dumping data for table `sessions`
--


