-- Host: db-master-3.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=37584;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$Kab80Hse37z6WECE.f/oxnMPktt7P6skYLNQmr8ERHbe1Igw6oDH3','admin','ak_e7c3d3a5acb212ee','2023-09-17 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$LUG2S0JDD690EzqxJzSAF3BFTny40NclSDsnH3lYhKAMZT8r3DX9d','user','ak_3e3d690aeba76854','2023-07-15 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$VLB2676UNdtGuHKcNr6/PnsPO5ve8PqVFXKxN6TZaOtHxiTbtx/RH','admin','ak_ae0c57c0b038c539','2023-10-16 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$BmgYDjllkdSD9j4rkDPRZDqhjxoKdOBZUgneNazaczTHA//yUce62','admin','ak_3497696975937dde','2023-06-01 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$nmgn1X5GQT/mctvbh1jb4UCdgULhIbJOxeU71KXcITLbJY9jy5JmR','user','ak_514ac7954a794a7a','2023-10-06 10:22:00',NULL);

