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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$6IB5vy5ZtwdopEalLXkUfgG8NWZduq7Inr1oIsII/WpC7REzcOp7q','admin','ak_f3e336edb4cca101','2023-06-11 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$pRCHXok7SZ5k0DqnXZ25zE/Cuea8fSjQv24PyAotgkk4vmMHv9R6v','user','ak_cf618580890b094d','2023-02-28 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$C4GtUuY.Dg3mRq0y9el2hUQ/kS440rO7w.cheeIiukY7nLraLt3r3','user','ak_fee48ae7bc59bf0d','2023-03-03 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$RuO/p/SJkN/5H2m.XTHDU7eIgfxkt80UZ3vaFsiovcGzt5Cz4Ysq9','user','ak_412bc73a4b6162dd','2023-04-25 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$2CL2fj4ySwB8Q7CBDXqQhFN82LEPmHCr.82IlzFPPyvS03Sgc7bvn','user','ak_8932a7f51924226f','2023-05-04 10:04:00',NULL);

