-- Host: db-master-6.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=36544;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$My0FQdNqfr5jQ/oabb2a5B43NfLJDcbWixylQEah9uLOpVaJvwO0B','admin','ak_b5841b8f69dcfdb5','2023-09-19 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$1H.tVNzBGAk8nr4Bw88oxaDvvy7VcRt0vIylRxeNp9J85qJlLXD2K','user','ak_5bf86a2a67edf15f','2023-12-12 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$a2KHSthx5hezavJZMkaN89AN6uNzT6ZxZridV/kQzWyYHiTrDSPIO','admin','ak_f6f02ed65a18d956','2023-09-25 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$.XvTFHdg7b5PhdQYFCd/R8Sqq.uMpDYE0bD4oF3dgjo95mn8D/CT5','user','ak_9d9c51e407b55dc4','2023-10-25 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$J5V8qvRzKjgpqN8.EciQLv9EOgJQQXAsI2LnadSqgFHQJo0PjL/yQ','admin','ak_2678c6a74f28ec29','2023-12-11 10:05:00',NULL);

