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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$jiaMFSKcPcjpRGDZIs7y/OaQJU1W0JNr29.zp2iDhQyF24hSpsUhD','user','ak_3d754bfc0abedc5d','2023-12-19 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$8TvygjvZY//5iG7mxfIQzlgJ7CDGtVZzG6vKlTx0ZOnHBQSix79AV','user','ak_30d6edc37f5cc3ee','2023-10-04 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$rlxSK.MyBuRCo0M/WXbMzn7lU8T6ikH3z8bmWXeRlQAbySalhFjXm','user','ak_9339486039787426','2023-04-03 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$YfjV7siXgVFOu.eBZmxfIkz3LZ.J67IkV6/nStb47vKtyjm2qEHKw','admin','ak_83774ddb76ce0fce','2023-12-05 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$JYfU6vsPt7KLFRX32nfkwoFpTUIHzKhDVvtZ2VjsuVkM8VBqWAtkR','admin','ak_bb13f45985375d56','2023-11-22 10:03:00',NULL);

