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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$8KQL6Aalte48dNHhtsX/PutkLgBqBJfbPg77Weh5ySMRwFF9zYjbt','user','ak_a2cd5bbe220c71e5','2023-09-08 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$io1xvTAwVPHOdh7q/iBnQcDKbZfiF3WZ2TI93e6P7yMPOFtBucCZn','admin','ak_f7ded136afe1bb97','2023-09-05 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$glwB16g6jymxvzDgH/FUv8VuhudHBa4ciXkITT7e8gtaKcogHRvCR','user','ak_5b448160f5a6191d','2023-07-16 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$NbFAi5k6B7vuWHzjGAXgmHEO5ODkHg1viuyKMM4Pl3iioqx5W/alx','user','ak_a101b47f1d4dd3d6','2023-01-22 10:21: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=9404;

--
-- Dumping data for table `audit_log`
--


