-- Host: db-master-1.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$W5xSLijS5Y9FRyyc7YUsJd2nJbh1tq.PxILr.PvaSqHRU9zhiyxOr','admin','ak_1af0d0c5899c1a96','2023-01-11 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$O6rN3sGg6O3juF3mptmCcsiEyuNCkjpuTr7ohtvd3gEyb1dTjw2d9','admin','ak_d8d299c5ebe06592','2023-02-17 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$JDBUKmYxj0YGICbs2cWMfbCIz7Ylbz8gFmsup6UJTSLDOpI.EJG9L','admin','ak_4f02230bd19a4ac6','2023-08-05 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$4DAixH.Pxt3H1UthxqJaZ5jAXhYQo8QBGdNdT0GU10RhZ.9e6dsqS','admin','ak_54ef6b34b0d6a8f3','2023-06-05 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$3eoKaTUQnsmGhFWgyuFxb3zQg9RISSmK7WN0SuvhqX76E80acXi/E','user','ak_52bebcc8868bd5ca','2023-05-06 10:08: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=7829;

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


