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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$JhdbEYgKLUGKacvopONfWqa7uOPglGskjPGk0wrLLGSQbW2c6kj0r','admin','ak_3fc816b23d45933f','2023-05-04 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$WDPBhj/8c5gU1/VyMh4UwXh5u14umGiDlBwHD52ZYFGS1q9Ravcoh','admin','ak_be1bdbe5a0b4ee6c','2023-07-23 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$lsDpTNWQ.unWmNp8Ut7bh7X3/9QRv82g534JX.tIhzlgTBJGfffXA','user','ak_a9751bd021a6d94d','2023-01-05 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$Ca9YcCdBAcT2eDbUpWjRtsJMUEHPkDDacj.Cnl0.c6zTSsPm0s8q5','user','ak_74a633df634bbdf2','2023-12-15 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=49596;

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

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


