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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$yRYFDDL7YDhK/IyasjYjFL72O2k2czbMZNL41ww7JJPqs1xQMp2bb','admin','ak_8e2e497ae2007ccd','2023-07-03 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$nGV9hilQa1e/.ALKjOn7F6pKU3e5eqV1s0n1bGniWInmriD8H.9uw','admin','ak_d5b83bec6affc65b','2023-11-27 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$JW9C9aud/Egh5Vux27z2dml9LH./mGlWSrMKayh/ja8q9U3JzUYn8','admin','ak_363d4a32d391e4b7','2023-09-15 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$pPutjUJ/3c0bp3siRghyPE/RG2xHbXIcVggB.fjc3nVuUuxUdrBb4','user','ak_1e7b58d31a7b836e','2023-02-18 10:09:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=18320;

--
-- Dumping data for table `audit_log`
--


