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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$3R5MjgTomg4bgdy/iyLKZx11twZpYxsOJN0vx2zhRVl2P9dPIePhE','user','ak_3f713c55532c04a8','2023-05-16 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$IWUV2.zc005R8UuGvtvO06gmER7FaVkAhMCljZH5DTtXfFYWze.Xt','admin','ak_833e47f98f2c06e4','2023-07-04 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$UkhtigpfknCVSp/DvwbWgQccsrZQHvj5CsORIyzYCzEATlZG4gcuf','user','ak_9be94ac1f36a0b0d','2023-04-12 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$7if1PyKV2SOCAbxJjSMyXRmkiPupTSAZHaCm2rf1wvSCMr1fQxqgX','user','ak_3ce798bbd88b7893','2023-12-25 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$AyWrk6TN5gjJkWbXqtL/X/Jy6Ww1JHR58A8h4q7oznqMNX09Z.kGt','user','ak_3b401fa886b65b1d','2023-08-18 10:01:00',NULL);

