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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$tcCELuu8pqoNN9mT19ZdwBHT6fFzB.iWGZeTzqXRwhMU35/wBBJVP','user','ak_c1d664e4920ff950','2023-08-11 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$PS5ZsUubJ0QrbSbvo8nVWlyMqZH1ulcwBBE5k3Krfi6iZ.R5lyCEx','user','ak_d7060d7bbe498570','2023-09-08 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$MmDJ1zdCoJfzXRWtrmw28fYo2gZh2DcSzIrAHBHP3AbawapPM/hJK','user','ak_4ed607871aef62f7','2023-06-28 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$hTkyLdEpqGJAnWbjd7fwkPssVrUYH.PRqIbHPPxvExbDrWqOFRPc7','user','ak_520e9f279609cc00','2023-06-11 10:22: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=19103;

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


