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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$wR1/h56OdnnzZ/og.ADO7Nt.vzFZ9GFdMyboSVF7DH5dUmo2Gf8XU','admin','ak_4e0d7a7ef978759e','2023-07-13 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$59VZUOkynpO6ZNmM9KE5M18OXgdiQgi8oUao2I0EFS3snYHhqHxzC','admin','ak_31d73b136953fbff','2023-05-06 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$giPudq.1zAIW7vQ7RWIM9uxFdEcKIZri.1zEPbv2upLDiG804gb3g','user','ak_f91253ee0c127c1c','2023-05-17 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$vUucC9DCp0YkrsPL94gQMVBkFAyTRveCmqL1YaWLEdf2WWP9M1OwO','user','ak_a0f08e2956485044','2023-07-10 10:19:00',NULL);

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

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


