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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$bFd7hKYFKbf5anDCMotfM94SnRqHOyVBYPGFaz4K3h/XgUPglm9K1','user','ak_ba5f332145348c19','2023-06-24 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$no30bLvuRzcLlRaAI3l7H2dUzQfEIY7sPvVTEZexDxrfg7NrxlVi.','admin','ak_204fe20bb10d545e','2023-06-17 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$ERRPjI5LmpsAcvnX7Ozsg/o2WsTrALJylQGMaPautqphEnRdTlZgC','user','ak_dfb7d27ba7ce1357','2023-12-28 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$K6Irntfb/eksWBqezFCfmZm.2iExPJ8Z52ZYovlqjC76vQDChS3lL','user','ak_e3fdc739f0bd016a','2023-10-27 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$5C/LD5jy/T.aKEzrc3LOMVQ8QTk5gRXXuTp0cFRzM8Uhb8QonSC8x','user','ak_7b1c35ed297994a2','2023-07-17 10:23:00',NULL);

