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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$VWeY/1d84ahjGFHn5CHB9VHCAsJw7MHRejd2diZ3YeciqEyVSSrKI','admin','ak_7d796cf014cb7fea','2023-02-26 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$c30Ge3UnWhxbsnJwYiW9C2gtsiLuUiu4Okrnhw0OvY830DvUgP2bc','user','ak_cb25e35aea524ca6','2023-03-17 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$AepArP9cD.SIHjH8Ym6gGjkqnjyZOC3ZX7DFqnyPEFqXZ1HUfj.vp','admin','ak_41aeac5f8e97fb4c','2023-10-07 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$9SZffg3frD2E5sFObl//B.x.pQ9kYwao/xPT6MhqtWopwLO6dFMME','user','ak_e28f965b8e57a01c','2023-06-16 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$gKZb4O1VjJl2Px8QB3JA8.lqUA/aiubG.LTRYRBQ0U0ZX/6xXqzC1','user','ak_57f8288c542f356e','2023-01-05 10:09: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=18278;

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

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


