-- Host: db-master-2.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=6879;

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$1dyf9n/Fx4gq79ghoLa3eicpyOvqeDAczgOHH0nzBbHSiPykcHbxF','user','ak_0d293834a37c9afe','2023-05-18 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$GJL3ipa16nww5wiWQszmFb2r9dPAP3YR2lSYuwi13AVNdAABn82/c','admin','ak_c1486ee7dff195dc','2023-11-05 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$fSbK0kLVXBc5egLk..CcV3Dza4i8AWsrWafj.gpmB7BIrH4.4WF/E','admin','ak_d16d6d1141aac6e2','2023-04-02 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$dx00QaW9V7uFCQ6JOHQq9fsfxHgeGLGkoFhwZA8bahDyI7PxWKP52','user','ak_ea7cf8d2605217f0','2023-01-08 10:06: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=36343;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=5500;

--
-- Dumping data for table `orders`
--


