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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$F5oVV2F5DEMEKvFdu9KCwue0QeGjQFrDTAVr9I2Ht0PLN0SfmxBKc','user','ak_d0cf1d42f8235ff6','2023-03-26 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$EPXqR4ba3YxhJ/O3pY6QWG4qDmEjL74rBknuRNZxGPV.hiy3DmBEE','user','ak_d913fd4039ea700e','2023-02-19 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$tcEIpg9O.FqwZJci1LVLYFgST5PraMHhSepwUAiKHcdccueS0Wq4W','user','ak_8a1f25accf04e166','2023-05-20 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$FMNR7KGDbJCvMf.e4dM.pzhJ2aQS.YWVbOXad3WhvwKZP4D2YB.u3','user','ak_dbaa0876cc34bc65','2023-12-09 10:23: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=47184;

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


