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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$IXbRjvXMVgQ/1G/a2wR.y8JC6a8lyOwF.fnqpnDqloa044X3lwskj','user','ak_a9d3d4fcf52de599','2023-01-09 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$DbBcFP4UHg8mdPmfSfL3sMKXFCkj.GYKJVYvM/sOTRqGaei6Fqqrk','user','ak_7106669cbf0d7088','2023-10-15 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$nZY..3grD6MGBVwfW0gTjXLGaTKn8kKWGxQ35FRJbX2/cUmUorIzq','user','ak_aca28424bc6f5ae1','2023-07-15 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$y6JqFJbsGrUu2M.pd584ymnUVvdQQnnTRM/951OZH1uxkY8QLFn9V','admin','ak_49909231b348127e','2023-10-24 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$fR1fQrkq0Ldwqgc/1S6P.UQ/7TYrSWzYLlULVlXQ7HwKsrHOheN4T','user','ak_8fb10e4080f762d2','2023-12-09 10:14: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=8045;

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

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


