-- Host: db-master-2.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=28270;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$/Ebw6mf7OXAc0/8s49w6Zcjpb6T27S6NmFlvlUr6Ohl95kbIRGGpS','admin','ak_14b3bb040f7b7e9d','2023-03-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$ndFEXBB9jW/GzSMXjvoNyHl3xysqtmbdWYoPyCnihS8c9U23cjddD','admin','ak_27dea774c985192f','2023-08-23 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$5LkB0p5uHdV8b3TH/OlZKONCzFevfMGAHOlEqeZ0OvX3gNuKPGf5k','user','ak_f7548401bff4d81b','2023-12-06 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$DhnvO3JY96Eu5LXgQ5rvIuKj4QMaeQTvVguRC3PxRHI957Rt4uuF1','user','ak_fa4e0a0a2fc70d7c','2023-07-01 10:08:00',NULL);

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

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


