-- Host: db-master-4.internal    Database: ecommerce


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$ISGQPFD3C8vr2pOjsoIEmHb.eRR/uDG8rpB1BazRGJ3tdtp4zm0pc','user','ak_8aad0773d1763ac4','2023-10-26 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$J.DnTVw4NrVGoRONkIWtKU2ziIduFWt0BJTe.YFda83X6BNtCo2ma','admin','ak_a56268e2cf8c810b','2023-09-06 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$LJNRKllMTkHXw9lp5.bBX.80sDPXDshkCTK1AxMStb61gn2ZozXK8','admin','ak_4b52b27dd62629cc','2023-11-09 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$cSp1Bi3BLGUfhbQ8sEiHvRH.Eg5f9fuj2J/zGAEIijX.Vl0DY6WVb','user','ak_bb55293c5eaef8ee','2023-07-12 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$YUi/2bE1PiuWKEWxtDrOeZFrnAlHU7m0BoerpMx95VokNxqtUTsdS','user','ak_6a9fbc9a13cd3dad','2023-11-03 10:02:00',NULL);

