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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$yrZdpyDHe6t2ntwpSccxNhI7vtCgdt1O8sCmurFTP7h7wclwNkSox','user','ak_4085454f4985a3d2','2023-09-01 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$gDJs8JNwifELwTLNGaOFv76LE9256d6czKgCTIPFMgPsYrP.WO.1X','user','ak_a500c327ec02d5ba','2023-10-02 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$Y.DppiyZN77wzaNt9r1aJ1r0CmOLwYClY6cpINHrZ.zyt.GrV2xGP','user','ak_b80932efbe578323','2023-10-15 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$ZY3U90Fvf5XmuRpS8J4RtgTGDS3jIhbvZ5IlJWLAsFWQUmjNPZ3gO','user','ak_dea07a163b70e6fd','2023-10-07 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$iy78OFg3UO3HhNvjP.lIPS5Wt2TUzbI5fLObHZWjtdKoPxTrL1skt','admin','ak_bfc1887dec7233ed','2023-07-27 10:21: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=49886;

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


