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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$aIAp9ycNorLfo.jng5PMIef5I747TolDL0uif4Ga0i7tQyNhcAKLy','user','ak_edc2fb9492b42add','2023-04-03 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$.z5uZ8BMyOpL4vOSPvfnkDKILjJXRfnoJjCkIkVKj7MIF/aCuL8zw','admin','ak_8c2dadfef21715cb','2023-07-10 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$GFigAjoeDrTKl7AMQ/SzSQI5kWHdAqilMSxvdMx0TVKuq3Jk7aRyj','user','ak_532a1dd1a318e51b','2023-06-12 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$cgU1VKxqtN4cMfcByEDzx3LzWcpXZT/Z3AsDV7gi1Jhpkv8U3P3Nv','user','ak_7f3ad5395c5c65e3','2023-05-06 10:08:00',NULL);

