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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$VciHvYtwdZIH0PR1Bliq7QpDeHEfcA6aQXkJ4pv3DhCvQk610MdZP','user','ak_e7f0e32199aa3d1f','2023-07-11 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$iQg5G2//3WESf8bE6dTK2fBYdYjpPYpjWk2Tfa3y582MxJJv2hehX','user','ak_b122991d26e72e34','2023-10-16 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$sUHFKZm.FM7hxEebviC2NT11RMEpmjsnXEf/f7mZ8hk6beSGzGh6L','user','ak_5544aca97fbf6f88','2023-11-28 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$vds/zw2EOk4j7lbH9727LZ.GQ3rCKl3X7sLkdyO4GHoremOuE29NY','user','ak_d2d377d5164bd6df','2023-09-01 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$ouc1RckT9fpmE0EEOAlgJKBU.mmjOi9o2AD/AtLIcGIck1zIv9VVl','user','ak_4e66e2db833a3bec','2023-03-22 10:17: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=2306;

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


