-- Host: db-master-5.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=22336;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$tnkUJ82zNLldtSRqN9tLNNCP3zF7OVzCLPsBlVVSflzj1P/nbqQte','admin','ak_ff9e6e5d89373a70','2023-01-05 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$1TZhvZmjKlIhjcDupie4k7PALg/Fi1zr986mfmwlgRXMy7DXmStQO','user','ak_3b2bdc3583e75e80','2023-08-13 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$3yASIueln4EkRv9B.Sqa7AoJHuu/3lcv1ZS.2KJQvxM4Ur5n0YPYt','user','ak_4f8358cfb3e3d77d','2023-09-09 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$GAenmCvZSdDu6J6RWafBA3bbCL9RsNFEIyy6l8B2lnpOX3fr1Rw0.','admin','ak_17dbd5af7a5769cf','2023-09-23 10:08: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=3280;

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


