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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$daoVIyTKkwzmCIb/1XFh/kx8XOQltsUEuCGR5yYUCqeLfZjBUyD6S','user','ak_031a2d630d3d55ed','2023-08-11 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$1UWFzb2o0sw0kWBIHDB42lVG5eqjtBntO86zg7CB9wEprl1nGU8dj','admin','ak_87f7a001acc4d8d5','2023-01-24 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$fbE4ik8wDHesKATn/0k.b4CDyiMnaJqfyzfP4inUqkVhNlljFBRLo','user','ak_f169eda4bd9149d4','2023-05-14 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$u9kRDhTsl4JBf8HZ2nz4TkG7Qd1wEdaL.c2PdCbF2fqYWcOWuXvCU','user','ak_e9f7fb58122ccb85','2023-10-05 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$h3qcoJUNMl/xKwMCrb1RGEkaEbeDS/K6JacfeqGGHL/YiVtmcjspZ','user','ak_2281adc66b49af80','2023-05-18 10:07: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=48213;

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


