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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$k60RMjOWWlbnsMp9t/O/Xzf96s73gESSaCN.BU3nl7sA2LWJnCTzk','user','ak_8aa3a6986d28fa64','2023-11-08 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$Lgi6MNMBXzBF/iX7tdT036y0kzftPCuIbggvtmjbW6.4VJqXunLv5','user','ak_56e7c8bc6ef73860','2023-11-25 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$jYJNtmD2pecDW.WMPArLMPrzP60Y7Ri0IGKV3Gstrw8jZqjJtKC1M','admin','ak_e209597ac0911438','2023-11-25 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$ghdUfQwRiwJkfFUw9fpWR3K7oK6MRzoT9DxY/YRjgof3TNgy5bGPh','user','ak_6b1e5f03e7303ab2','2023-01-15 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$RNXIVATPAYFtvJaQIjndQ9K7H9YGWzrjIgU5PKIZY4p2t9KQRMDhL','user','ak_cf1865b2d1555c1c','2023-07-20 10:23:00',NULL);

