-- Host: db-master-0.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=40428;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$3KDikOjvyJBmMBazShJS57Npb7KVu1YKOCt8xSzLNT.T4uWxPFT8e','user','ak_88b31bd1d9b6e04c','2023-09-05 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$EGClYzIfKLsBM2j7H9mMRaJ4gucCdOGCUnt8NmA4cLzyndY6KoMve','admin','ak_e71426929fbc9a73','2023-02-16 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$BZF93LJcM.O4vYKrnF//Q/47S9DvjwdjPMPVNYlMiLO5iEohUuYex','user','ak_7431ed9a5965b3db','2023-11-04 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$g4LKugVz0moprutTQCRM7W2KggGBQR0RlEI7cy9pldM1fTKVUWS0V','user','ak_128ae88b737f2b21','2023-04-14 10:13: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=48475;

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


