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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$lQA51t1AfkPq0cjzVqL2b00B1HPNZHys9.zIOY2zLSX/b9XgQW4O6','user','ak_fd0c388f9b537f88','2023-03-22 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$FvuzJd74AR3u4BJaiKpKKfLBQcN1HlgtMtLE0zl4hOqTbRKSGlM6c','user','ak_5adb0f0bc52b306b','2023-07-10 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$ObvFtx46c5BUMwUTNOtcRafdPLObsbFr0m/tlCdDBPmBDFTkHutyp','admin','ak_519058cfddf0b55a','2023-02-23 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$Ww.JcpQd1Qz2xUobGsSs2txT/8EXBp59hCgPP16wlZf6V2I7mh0V6','user','ak_a16bd2ebe4f1b339','2023-01-23 10:08: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=22894;

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


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

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


