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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$sBtpjfiEn6MHl/0KP7Y8pc6CrZhI.TZpVGj9HJKuHgY/nQ8uiJ9St','user','ak_bb1cf3b9288d92bb','2023-10-03 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$vN6dhiepXqN.jZRJaoa7D68O5zlZbldzmRqb.eudd9XHWp9F1wS21','admin','ak_713da8f691cf8a18','2023-03-13 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$dYIdtVomUKU3aIVpPSSr7wHkmBYRZ1vFrjI5GQGEddG0mJwlNIYW1','user','ak_3c46724fa75731fc','2023-09-09 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$Vdwp2sB8Sufn/arVHci.5efFz6kkBTrvB5q4dNGtPVZjYM.oh3zWc','admin','ak_ff1f2d35783c2dc2','2023-07-20 10:14: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=30982;

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


