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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$TOpvzNhkBHkFW.zCvqp1MbZheOF/.b9.qs9b8aeJAIt9vCQ9RrpEI','user','ak_378468415dab1cae','2023-06-19 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$IXrdfbHrUXEP1hanUTdMWwhbwjIYgVUr5/DF0VZ2Hi6us8Ysoywwz','user','ak_12530a23d651b2c2','2023-10-20 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$j1TrBjYtJnJuI2Gm/Jb97oT925/TQ7lA7oK5IDKBVEziPB9GxJ0uY','user','ak_82064a02c4cd4a49','2023-06-11 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$uhKNvblg6YlR4cNUa.2wz8KXAqL4.QkQ2OqS8St/VFtZFLIFfEk.t','user','ak_501ed1131c8ecac1','2023-05-17 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$bh6OWMvH37EffhbXVzdzd/5so1bZtT1v4UPoaQRWdhpdIDVKoTVL/','admin','ak_4e47eb5b0445df90','2023-10-22 10:01:00',NULL);

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

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


