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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$9Elm17XEqbTfyf0buPyTutIPi9tDrN4MSyu7GP95cEX6Un3iNokIH','user','ak_3a2091647160604a','2023-06-28 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$DeVts4c0e1fz/.RoopQt4IPVp1IKPIS6OnPGmd0RkV1dePU/Tjm41','user','ak_d7153743bef6c990','2023-04-27 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$xr58Yk10OAh/SeGEjjnSbzWXXxEW1OFNfZzFDU0PwxwGUmJGzLk5p','user','ak_5f54d340377e55d9','2023-04-19 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$EcKLAynQWey4xfqeS2LOs8epA/ZgVev59SvAaTq5ettkXuTHmkXHL','user','ak_f1f1303ace149973','2023-03-28 10:07: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=30163;

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


