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


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

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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$7Sp5O2DcKGZPebs68zi8DHAVUgGSYsS7g4ln7xSQyKiPxyWanB7lP','admin','ak_7f362047e615cf9f','2023-12-03 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$lyOwp0k3fEdWd9z79mWBwPwciiUq8UTNT171GFhv4XUFm188wK4E7','admin','ak_2ec6e714b1a3fc3b','2023-09-11 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$BhZqZp/UXYI1bPQYHyomqXze4m785H29ujnGhNfU9I2quFV0Wg3mj','admin','ak_0e78dffbc2f950f3','2023-10-01 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$MXdkAylpIAl2ePoJzCq0pJIb2EadTM55phgh2xDSeE3iZkK4ju9HK','admin','ak_413a78e6f3dca70f','2023-08-02 10:16:00',NULL);

