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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$KCE/C1HhHB2yPMfeKil66a0h9j3h6qXH2hReBTB0aVyUrWKoSVT7B','user','ak_e090cfa7feb98ef5','2023-05-16 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$w/mzKeZefb7jH3Y0vytcMaionE2KzASfgEs90gWKy5J8pmzjBT2Ji','user','ak_7ea211c1a70bd841','2023-09-03 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$IvBJK1HjIYW3dNyBxlHWWMNP3JObsj4E2kjdHIb97dmILVoeFtjy7','user','ak_f26e2bdb013328b6','2023-09-16 10:23: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=38347;

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


