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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$wC0Y.dEGk60DZLpK6pPUBu7eWN1zvXbdleU8En5sLpyscELwwzlkK','user','ak_400e0fb74860e45a','2023-08-08 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$/ixbrHKJVgsUYqqViQZz1dR2y1z3gBA0TzjdrBSx0X5pgFAkc9SEC','admin','ak_92c44e7a4665f2ae','2023-11-14 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$XsXF3g0p/HpqAVbeq6DnfojT89oStXeR3sjlBmOownQZ5I1vgr7eh','user','ak_233c53e13884f816','2023-10-19 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$xGByJ3HrmRgKn8UDjeY5I2O9ywg65t0rkuJCKru3lc4jA84f3EZaJ','user','ak_e6c8eeba771f235d','2023-12-20 10:22: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=30206;

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


