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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$qSpXkn9tihjN3hUvIU/6.axj28h/SizbFUv3Uklhlu6r7vfD4eG1V','user','ak_e5e0a20317fec2be','2023-05-27 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$UhXJUZokpKUwiyKh67rcACuDW5pIs1dyOxKl7.UeQKcYcNOCKV9pI','user','ak_ee3dacdaa2116d5f','2023-05-22 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$KqthVkLTjEC8aCNK0N3ONNfmdFtL9VwWrcfdw.05LSKY0SAiWpCJ5','admin','ak_d4c33502d1c7bdb4','2023-07-10 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$WjMQ7/cbRNJQCsSQTrkMwbgPZBYXDEd5J34aSs0ac73oAy/Dp7r9/','user','ak_a18db7fe500646b2','2023-03-02 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$VvMwOAJnBLbq8L.dIecdCkO9NNcZu/iudE2mYh5Bj.rSQrtguoPcA','user','ak_a13c3bdab50b7198','2023-11-07 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$LoniDZAEbXzfDrJR/stJVLDL9yj2wGAhaceD9jV6/DQeME/d4dliH','admin','ak_d2dd85662dd061a9','2023-04-23 10:12:00',NULL);

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

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


