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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$DFr2ADfIdLTqIdw2yAVevDrGsC5WxxToFueZoxlbTszywCOhF9Srg','admin','ak_39fbfcbcc3f24bbe','2023-09-15 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$A1.yc/sKb97XAA6m11mlcVNYkXYzGPBnzhYj5MmBZLK4G502SwpLF','admin','ak_50a103eb78b0927e','2023-12-10 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$vMOI26FgOrOe.ZtujN9GikQVg2fU2j2AbvGPhgWXkFcNcJAWzkHhq','admin','ak_2fa41721b2a6c065','2023-07-21 10:23: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=49885;

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


