-- Host: db-master-4.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=31364;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$ac98eQt67E3HBaT41/2AtRPbx/0Z6H5NgIl7eTjNnVISGtn0Vq3pN','user','ak_af648282f70731ef','2023-07-26 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$eSFFwlutFSP8dY/LJHY1vSplwWlenjUAUzbob8WEV.wkuNFiLYw3/','user','ak_48ac04a1d75f6bbb','2023-10-21 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$bK6ihNq/hStRZTSkskkMzp3W.mi/8hYDV1vJQFeiQBuHdo2uV0vcV','user','ak_cb753e5931837c1d','2023-04-23 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$E4jwdlPrB3QwJcBNdM5GucMS5nir8HmVZ6xd8r4HF2nvvKizo4AJh','user','ak_e763a203bcd83340','2023-08-12 10:04:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=42193;

--
-- Dumping data for table `products`
--


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

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


