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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$lA2iAQzxkSw6swz0o6QpLhH9u5dl1QVSzu.udmuc/PEqZywefHhw3','user','ak_6dab4db4ff0d651c','2023-04-15 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$QJOxV3CTWcfSbCHRT0zp6T608m8a.7sjkqo.v4eQjQ1jWHsp3dQBT','admin','ak_b1d7eb0ccd237de9','2023-10-14 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$Z6jJQtIBzAPysc49klN0jB8Pzm0oQI4qNQzFKh2e1SoshhTtTH9Gy','admin','ak_110e2d64f0164518','2023-02-21 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$4buoyXbWUZNCtX5ZG4hIBEQ//Mm25319JaHgvUnXcefg.ullhrHiJ','user','ak_02bc719233c1cfe9','2023-02-08 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$nh0FU6KrqRLEv9QuVqb541Mzptcl/219pIurnRcAlIXvhFciJV80B','user','ak_b5788744e1c2b072','2023-05-06 10:21:00',NULL);

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=24942;

--
-- Dumping data for table `payments`
--


