-- Host: db-master-1.internal    Database: webapp_db


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=2401;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$.dsbf88.8T716iARQJSEaSNPtJviVD8TAq9hAjhW3vqiKNa/pbJjM','admin','ak_ee37b609f0621d2f','2023-04-24 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$XueplZfII7YnHvoSusx655D.E9Swz6ZcBfRuDxPtblZN9jJByXewj','user','ak_8ef98537a93ad2d7','2023-12-21 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$OQNi1aADtDh5XPbxMFq4.g9iXXak0WZH.RPC5BbfC2SLt1ndVGT/.','user','ak_d7e4d709f63876d9','2023-12-28 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$Kcl5sWn/cs86X.ZQzbZ7Fjp1Po3qp4kGwPIP/dz.xwKc46Gdxm8rR','user','ak_257592fc30513c85','2023-12-04 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$po5/YKPY3SOirzprc5ZBi7KfNb0kB6UD4B.y9jSUUzBMmIjEa0A2O','user','ak_c43fbd90caff48e7','2023-01-26 10:12: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=34886;

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


