-- Host: db-master-4.internal    Database: analytics


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$mmGBEUcCgmOlegFlyE8GU1kLUS1uJsen2l1nvjzQBQgm46IjaenLm','user','ak_7c76837814b270f2','2023-08-19 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$K/RZGIex4HxCbnq6LuIvQY3mWUc9tOIeIZVs.G0PV9jtBujkazmbM','user','ak_35486eb94ebe686b','2023-07-06 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$9BYthNasPXAXFS3iTpbxiHzYo5y/AZlSYEouLt0DghGXVl.NpT6yh','user','ak_b98e19aa21bede06','2023-10-16 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$yQQpAGp0KQ9SoAEAzrWZjZAA1owXMJFpfgdiZzHjx5xkraBFmbMAQ','user','ak_1aa90321cb588fc9','2023-09-15 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$zz.a35KtAmU2GY7joG8QrhLWgJGTZ/CXasyRYbM.om6ywslqEuRWN','user','ak_cc7920f731caf21f','2023-12-13 10:06:00',NULL);

