-- Host: db-master-5.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=49963;

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$YbiyG6cB1dcOqzCJXQMNpRy.PjlwpaqEIQUZESNdgqVNxO73DKHpZ','user','ak_2c095d05a185d1fd','2023-02-11 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$5FT89LNZE9lxHaoeWf7YXiLsfXGqhw24pS1VmyShxuh24gMcC7BC6','user','ak_3659e30de6023a3f','2023-02-17 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$4JK3.cSIxUR22zr5QjntwYVkUVmHPmdU6UT.IDOQq493OuF.CbtoG','user','ak_855503e3dc21439b','2023-08-14 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$LxyjB6dX/M5yyAouWnP.PB4cq4S4Ceu5IPJeO9.zyxow13fsVC6ka','user','ak_a71032352a59f84a','2023-10-14 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$paDEtZ4fHQvK.x1vmzKMiSV0QA/T8gK3ao03w1BtmY0imoWswK5mu','user','ak_5c1a06d127f3b712','2023-03-21 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$aTrgIgGvc6cycITlJZFXmVMN/Yl71ZMU.P8nbijXR9eUTw4ZUwRI/','admin','ak_ee18e44bcccb938c','2023-08-10 10:06: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=41415;

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

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


