-- Host: db-master-6.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$1mnb.ONmdX8LHHR5ElYtoFL7hicHzLP5ejStsUa72EYg8kX4AoleZ','user','ak_720e9c20ee2cd13d','2023-05-25 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$TUo4oPo0B/o0kGta7ufvYwiml5gAJAwWEj8PMHjctLc4Iv4JcPGRQ','user','ak_482215b4e64f204a','2023-09-02 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$INWhp8.9v3hP025G36ZB4DX7SUR8tHaVHU.smQilN70jE5zp.HFLZ','user','ak_9146634676bee237','2023-04-09 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$0gr2cIG1s9SrPvelO0.OpGdTC2ub50S/4obNnW7dnrtcJTb45FTWs','user','ak_c785ac343229d171','2023-08-06 10:12: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=8983;

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


