-- Host: db-master-0.internal    Database: analytics


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$PjZD6V.9RDscYs6K/CAz9XJu.lbMIIgln.Fc0SDmz5kbIorZ2s3L5','user','ak_6f7ad04fd46ca5fb','2023-10-08 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$9ikkunJXEgP7rg6UQcuequvG/4iXTMh6LNOY766oCwkS9xfAmFRrU','admin','ak_140ec3149c7308e3','2023-02-10 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$Z8NrUOu4hH6Q/PAXBMaboYFUG7jrv0iDsGqjS.FzKRTx/CII/GZIe','user','ak_6ccc15fd24930337','2023-04-15 10:03:00',NULL);

