-- Host: db-master-8.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=22454;

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$cJFzS4CHZFCF8eMqfFAonmQx6iXZOZGslsepAKnywN7ET5AD6kCrq','user','ak_e201e241955e04ae','2023-05-21 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$DBOGtUUZirjCCz3wDXxj60vieH.w2x9J.1EzyBKpBVCXWs80ACK4B','user','ak_c8a291858a2b5cb9','2023-04-06 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$aN9AbhsAyx8MdYwJ.R59ODL.678398EUaAKcfeE95wRMLHPa1bHb1','user','ak_93ff313536192c4e','2023-05-12 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$Mskxtzbu5u6rcF.G5BGNSlc0JEdxk9oL20xpFsy92qQf7t3uB.GMQ','user','ak_9ffa0a2305084aee','2023-10-06 10:05:00',NULL);

