-- Host: db-master-0.internal    Database: main_app


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

--
-- Dumping data for table `products`
--


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$VFOkB9k9gb9SGoz8YvHtsrlfYSyveS3RP6yO7pHSZRbrFqKP.X.sd','user','ak_e0352fb01e709340','2023-02-04 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$iUJzNgItrO2lPZ/DK/2JsC37knBt7I2ezafJlA3jEfE6KOBME51h1','user','ak_da579ba470bfc45f','2023-09-27 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$f2g9tdfOs9MpMJJ1v6HWYpZqReP6pZvgAKXLHlhUSZ4/jxv9gU8Gn','admin','ak_c739321f90a678cc','2023-08-11 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$tlIYKxPNQp3cM8Q9NAiSf9jPEJdz8oh61m3mkfw1wXPT.B2Fq7c53','user','ak_f08eec8f88d9b9c5','2023-05-04 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$HZNe0GjGrc4GtyGr7sqse8czEi9w4xLc5sH1TjBvJfy6lyjKZz00N','user','ak_3dd89c8f5c3cb6d9','2023-08-15 10:20:00',NULL);

