-- Host: db-master-5.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=27477;

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$b2z.DxpWsskuQisQvDY/qepciIUs.JZKD9ja3uODHp0BRE.j9PbHG','user','ak_aa443f7c0aae4906','2023-12-24 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$cPfa/8edqVaiEOWHCVL64dE0G/4pWzgtXkc2WLi6IRJrKehbkvUld','user','ak_11f46d4aac0daa17','2023-12-24 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$AjVRwJaC0jEvaykGWDg0kz8VZdoSoGqYG3uoxWsJzK0NSEsw3.vJW','user','ak_788ab8c4eabcc785','2023-08-15 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$WCZBh0FLp/w5IXNqjs8UHTvvgNaXI/44fNXMju9JFQPycXzoRC02x','user','ak_a7aed323bfefed7e','2023-10-03 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$uPfvWF3g7.g.NnIX995SXyOM8Kc1hxxc3LREIKZmk.G9IFOMm6pI4','admin','ak_af98cc1d1133bfff','2023-07-10 10:08: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=7274;

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


