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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$Qb3Cs6463Qthdd7vHtGekOm0UUvFEgpk/cWYDhDP03mN.b98JDsWV','admin','ak_338443ea446f332b','2023-04-06 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$IHN/NCtV2eYPb4ZgLdv.smnnbGBCeQ3Z8cKBrZ7RlZbGM9ng/onob','user','ak_61bde1014b8f15bd','2023-04-15 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$QoTk35vmHCmmReRJuROozYc2q//iJcCt7qIRPbjkXg020RqamtWx0','admin','ak_44c9153c497bb29f','2023-03-11 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$ZhVGlamUawhU9mwkCnhSsof0/rXCVPqRyIifSqALCbCoerhHoI3U9','user','ak_20f2b04d41a643f7','2023-07-20 10:05:00',NULL);

