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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$fDpDH0X1rG29wBV6hyp0U74ZZhS55hD8OS1tUAh8Ke4iSYt6bc74I','user','ak_1598fe22522959fd','2023-03-12 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$z7euv1k93d1Hw6zo5209HUqz2SA36HPt0VqxOv.J05QVvwkQYXOe1','user','ak_52f5d85bff9b1600','2023-06-03 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$408Vg4F0EnxTacFAE6ErekXh.wXE/k3qX/QVMIAQx81SV7tV/amr2','user','ak_f90e3703e0784aa0','2023-01-21 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$7iFbtaXsrZzLq23I7.vYXWEGiUnXyoZWpscGdoaIudGaBHgz.V15H','user','ak_d9681f58c1a0a174','2023-08-28 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$9gChn9VZfN4g4QPI3..0JPheL9q1zJmNQhxxyZpztkdU6IA3Qo330','user','ak_1dfe936db6a5d9f9','2023-03-06 10:19:00',NULL);

