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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$J0O37kUbszZK8chhuZ6smNFMx68TXglm1g6DJL6rDG1mOcPuskd1a','user','ak_c1ad8a19d5bd24e1','2023-10-16 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$MrTWT2ogvhZCh6kUn2J5NP8KCc1QT6xtHPrwMlQ9KF7ZT.P6UQ.SY','user','ak_863f75798888e854','2023-01-13 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$dPi9nYDyq6qvk4/yBIrmuv/VjbA391AHwG7efNf4QBTYigAVKzOXj','user','ak_7ff48de8f7e6b9d0','2023-02-12 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$ytxpNxnVfKUOH6f9nVNxfsGMQmSVsWemmTTmbiDNJIarBjrcgUNI/','admin','ak_8a09a62374cf661e','2023-11-19 10:17: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=8872;

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


