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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$uLAVUHMSZvK3ZJRYgz2XLJFXKTHy6gfKpEI6zl8Beq7JLFBzLH8rR','user','ak_bd227bc9273e8366','2023-01-07 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$WhuQnFQ92xhCQdGxZbghtYXhWjNZB0EAeoE67gMJPy25E4Qf9D8D9','admin','ak_600a834e609fd91d','2023-11-09 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$.rOMbpzonZjLNklnyVzbmj6DJsMOZcGfoIT2rUUXQX7i7968/R8J0','admin','ak_62e16b4f96651588','2023-02-17 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$2h5L0AfwYLHUc2hP0JHpQ0ydFTEMgn2C/MJfCGYXS6TMln/jFaTiW','admin','ak_ea200864e9edef5e','2023-10-12 10:10: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=19682;

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


