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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$Q/b4tiFqhn5wGUdpiBN.I1/fxIhJVNei5qbCDbk4WaWgnAj1JHzag','user','ak_fdc598f64cac862c','2023-08-24 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$RHRYGMEfZ/qm3DSCiLhl40hNx4cks2H6.b/oIQpKAUH0pk.EnkOBE','user','ak_98b4e9e7059cd662','2023-04-20 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$MN4raKBmE70Uoril.dTIh4mBAbC4IO8y05ONztJLnPIhKW9potOIh','user','ak_0ea4845ccc3df038','2023-01-18 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$Lx3oz1lBRnU/9DoHu5jLBND5kVI/guwc02u9NcFZICiMhyvA5KRlD','admin','ak_8f0b86c4a1f69615','2023-10-14 10:05: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=17382;

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


