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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$c8F/PuvDv8HKUkdZO1Kxne.3R8IR2xE2Ssalqy4PR3p6Pyi5xbyxc','admin','ak_12889c42e05be0b9','2023-10-11 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$rj6VVkADt85c87P9JrM2ITtoapX4cT7L/26T5eAxw92tm2j.LUCtg','user','ak_1d569fb066ed7541','2023-04-19 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$olREogNW23AxSLYRQ5EWf1yAVbgi6ArKgudve8M0hYhXUzLRd8vYn','user','ak_7a117513d1d26eaf','2023-10-25 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$RSs3jOvsXEOAUTfwG.SYkdZ.ryvPMRQp9Z0r1BcueVKrtuWOKARGU','user','ak_c4517c92dddcd721','2023-07-17 10:15: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=25947;

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


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

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


