-- Host: db-master-1.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$v2J6jeTf8RsfSs2uusNQrMTLJcRgyTBZfFyxZNYZervPBLXQtJxlb','user','ak_6d2a6b8575441261','2023-03-28 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$1tq0iAhvFaVuXpR28o2POfyDjnyZ7ULX8Q5ZO50RO2K0rSJf3mamK','user','ak_e9b4714ddebebd15','2023-03-25 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$oe9OHk5NbwqOhgXdDDrJlNwgcAkubz4cDLMTxpmkKCY0MLBydV5Sj','user','ak_86ccbda2d70b5744','2023-08-19 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$WIAL5n0Yn/loHmhApk9chABQSCOIvTwDHxSSHeGcb9sCw6oajgaEM','admin','ak_eab97649beb90137','2023-01-28 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$AQhZh5OmLe5KHaRpcwb8.Ia.cwJBVYOJWu96PmFMNSofEkb4HJXCy','user','ak_52f501ab1a82ae0c','2023-10-02 10:22:00',NULL);

