-- Host: db-master-0.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=9824;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$0NnX7SrnOvVxvQxTSwvj602JmVViBSMc5lyxTFqeHua5XbYiuPjJo','admin','ak_eaa3ad97b08af559','2023-04-12 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$H6rgyaUBCTjDpzdzlBjBEQ.MmNxnIlmukK6GtFG6TT/e1RpU5eaTn','admin','ak_c0a1adcf0e7c30c9','2023-12-18 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$oIZgMGG9WAd/NYQRSZz8j/QrGSdDR/.eOYFNphkD30o2yIVO.VA5W','user','ak_605d9efba7f638b8','2023-09-12 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$lT/GU8Meg3SAxD7cjAP8YJ5iRNA.hOjQJqRxOfTJqtirbbsGFI9oy','user','ak_9509562874f52c91','2023-03-11 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$zezIK7DvFAssKcYNN9.5UL9MIrcs2Y6RhOgd2rTTf5aj4xGfIUK5h','user','ak_ebe96aee75fc78a8','2023-11-21 10:01: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=16666;

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


