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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$FlOXxKxPuxzqdzVrmbScyMFrCG3c3a7WV14PtW6kz/7F3R8.7SSZ8','admin','ak_2e0e4ad6b9c18e15','2023-07-08 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$baN9BITNDHcavnupWhoX7j7Y.0XPS.zv4YTJMeEw1R3m0qWzBL6h6','user','ak_3851b5fd8a6831c0','2023-10-07 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$PxzgiAhTQt9iqStns9qkd9uyoZdqOMXqsob7OmYg.ujp1nfQobXpA','admin','ak_6bc9b8e5700dabee','2023-07-27 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$KaqNfUH/DvrCgcgTrLi9gcUOBE82uG7kglZH1oC7L6LfbFMqY/Aqq','admin','ak_6a12c1ab2de99c51','2023-07-16 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$lcqFeQYeRY8h.YYzJbvrEXkW0WjQJxLVZm.hZI6YgD3DWTa2XeSzL','user','ak_70ff0cf7f3414f0a','2023-05-01 10:17: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=14503;

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


