-- Host: db-master-5.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=5282;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$dpOdJHbUhfE3NGqeMGIOb0JA2docWSgYLpIFN2pKaymad1gkSsQNG','admin','ak_c373d04780626c88','2023-01-15 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$YG8KV4XR.aqPb0tpOrx48TWj0e9mjTkNOAP4lLdOE7X4LRd/uBENZ','user','ak_631d539814162255','2023-08-01 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$Y4N9hJ5UbJzbh88sw4kg6gIYueE6QQsfadcZj1AkHbbDw6QnFDqhb','user','ak_771e3c49fe5afef0','2023-11-02 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$H6vN9jw5p61DMucTdhmdh6qXxIBROqX9RUTUFqxHnz3BoghgIjp5C','admin','ak_f4956b9b4fae64ce','2023-12-01 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$8MwO.f8FqtB1M6evqgXZZdliF91wFdM6FtDGgzdgwBylWDvKt0j7i','user','ak_48447db2f8cc4f88','2023-12-16 10:14:00',NULL);

