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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$ncOxeJ06QUKfIO26Q4FE5S7a79QKS.rqESX1lSyMAQM.GTHwJzWHS','admin','ak_e41d43415505675d','2023-06-25 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$lJkI3W3naT2AQx/Ohqqk7OnVQ2KpzF1ZeBWNYB74E5Rb7hlAv0mvK','admin','ak_87bd85a2a10e9292','2023-09-11 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$ahlkKzrnfOL0HF01zgLTgVgTNdfp/8GrtoncQnibV74Ayh35FAcI7','admin','ak_25e2844494102fea','2023-11-12 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$cL62fsL4GL2lNoJnPW8je5hJ/lLiIkBbcZ3wvXjB9tOeujpprzaYu','user','ak_b8b6e58278e5c4f9','2023-05-15 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$K6WExUhrmztKS7D2Rtju2owd1z487OupQ.lA/BH4Y1SFEHtZaSxeL','user','ak_35e6c72fd11c35aa','2023-04-21 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$PRGTlvMeLEmwFd/WVMnaqUNg4V95RXvf/lp513/Bc3Nifnq/OIq0y','user','ak_08719b76946534b9','2023-04-27 10:21: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=1201;

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


