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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$Ru4O7y2G7jv0AFXz4g42ZgRoIib9qWp9D.eVgeI7CdGXfB6VOpOSo','user','ak_3a8e4782641f421c','2023-04-15 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$189czH21dj5JBU9.5B09esypyKQEMm0oBGHkYrdDsqG66bU8pjFlR','user','ak_e41ab1c856d4c3e7','2023-10-06 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$rSVyuZLTbxbF6lKLP5/1BYnVSUYyjnLAcKOm/AgGwffPXuAlXECj8','user','ak_dc298f762b802cfd','2023-05-17 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$NjtDKlCJgm5JPPUptgWq5UwX7gMaVdREHDpbSoMKXY8zZcJlI87p/','admin','ak_72768f00760642be','2023-06-21 10:09: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=26749;

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


