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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$akQybJW2bQpkXAAAxKYtjlcb4zPG8KVzTxGt2Ez7/GvYgIdw0hAKE','user','ak_9e781caef72eb102','2023-02-15 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$YkKnt4MXszG0dVtNAvHPObcjlFqXlq5Pl65e6tH0IJLk8PrvKN0Qt','admin','ak_61a54eb6eace9aaa','2023-03-22 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$Kfqwf6M/YnsOg6KGlkqFW0pUSlKAZoHQBXyVx2lVjxEtlfnj8U.Mc','user','ak_63d079a9fa9c2366','2023-08-09 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$Aijp/9.I.myvZ1gvwg1svsMNmyE7UUHD.StXqefSwX3PdDz5o6ezd','user','ak_ff3dbc43e2e4a7d4','2023-08-01 10:10:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=6766;

--
-- Dumping data for table `sessions`
--


