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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$qYocPJE8pBoxQYC5TqFrX0euZ/FhH4p.bHmdRjwcNIx5UqG2Eamyw','user','ak_c4ba2cd8f7883747','2023-11-25 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$YJC4Njea3oHkVOjQ2UDkyuI3lO1XTjMLzG2PrFsvCE.2t7GXY4OW3','admin','ak_1db124de22744626','2023-06-01 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$nOIcX4aEYezv7/U78Df2Z6f.u.WeNSAo2QAP307UA0Ftc6pcfFS72','user','ak_002922023bd73509','2023-09-28 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$ZiteYVCNPrNqz5V36cPs.LCK7bZY0Xvi4wyK6czzAGGjTSvNOsnoP','admin','ak_8c81d20f716f3035','2023-05-26 10:06:00',NULL);

