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

--
-- Dumping data for table `orders`
--


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=19595;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$G4X4vLFSfvUR5tS4FGsFLjf2IFNJA8zFUce5jyIhWsv.ltfsI3Ng5','user','ak_18632d3fe33f39c9','2023-06-04 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$ebqgRdmxHrRlE7o2RDNq.GyBIHd21KIa8FUAEhiK6ITpSzZKK41U5','user','ak_b701bbd6f042a2e4','2023-12-15 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$gl4q1qFZ4VScKzzEuPmSGg.0CNd35MVDz2i5Ih1v34RzFlPERwInx','user','ak_7467a7e3fb24053a','2023-11-14 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$eHCoBQUWibkahN7TGDaOigXWVp.N3dsqdqfShHWcEwKuLOxtbL7if','user','ak_036959f86a675a03','2023-06-23 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$80lBBr08PydNVdc.0PBD8NFV6GnYZyGJEGf22fMgASwvHZyQohFg.','user','ak_3212dcfa922937d2','2023-08-16 10:14:00',NULL);

