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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$d7qyJoIXtc.J6ayQFK68TGfG9k63.dINbxlUpYSIIL8hLm7YkDuYa','admin','ak_ca5dd432f9dc5a04','2023-03-23 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$8hhE0NfaLSb0yeKbVWnxQV6Rcy4sXrLxFGVAna6IKVpdXc2ZKen6a','user','ak_4f5e07d7af8c80d8','2023-03-16 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$6F03Riv8U2C.NSjBH9H4ibxftK5SY/9ZFDt0kUlT3XDr3J9nj1GYQ','user','ak_712e397ca66ec4b6','2023-02-28 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$Ppz0tLnYP/C1VOzU3B5kFJ01Zl50g4CGPtf81iF2aKXOLGvyjj1qQ','user','ak_14bb30f512d6c863','2023-12-19 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$4Bsquy1zF7GHtlJn7fYmqeGqcvydk39JosR5HN6wArPs/p8iBzJnI','user','ak_b5073941edb96e43','2023-03-12 10:01:00',NULL);

