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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$cL24yKSii7cU3wa6HaIx6bbMWWSrOh/Da/mzHKLCwNsO8gs6oxArZ','admin','ak_e0709608a8fb4c69','2023-08-17 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$r3NptJawvysLFqLEpa5bZgXak2mRjiHX0bEd86I6Z5rsxaCCAZZKp','user','ak_3ad96e6916f2e609','2023-06-15 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$wG8AbsdigAst9cYatngBcUz/Sqg/Qdhm70l9Dulb5Ty62TJSoLspt','user','ak_9cb4e962af7ede00','2023-05-04 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$6MaNbuNJ/kRb4XWa65ASSWI5WbzOexeDHgYSu9k9XRZnHmkcztTcY','admin','ak_06aaa420dc794a5d','2023-07-26 10:12:00',NULL);

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

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


