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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$znmWZoDnzdvOvUEg7C.dUAxhivdc4OUcjcYKpLmMs8e9/k0b02b2p','user','ak_33839bdce7277122','2023-01-01 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$8KwGfo2QSGWtQ/5cETOvKG6V3JdOMU75cOr/YYKFHoJr4BQzJna7z','user','ak_9d8d74660067b7bf','2023-06-15 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$M9AkoHE6O1eqSIAU866HHR3A4muWckBcqla6L6qoB13trJwVsDZld','admin','ak_eacc808b07722790','2023-02-22 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$wtzNwTybOPzqfTd9uYHgUVSu9vsU9DsiM32G7MKSRA3o8veBrlpsJ','user','ak_f78ef7bd781bf174','2023-09-19 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$CRallrUnhb.wBj00hyAHJKslzfZ/.g6utZdZRIT/KqmVhmFj8p6F4','user','ak_14915317bf0a4bb6','2023-07-25 10:14: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=22894;

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


