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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$ZN.OSX/21WusvlYO1VVwjzy/he8zBZuWf1s6GrEyAGyiFMgcnEd2s','admin','ak_611d141b962848c6','2023-11-11 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$I9guYs0IKEFX5av3lQE0kFi/55oZBjCdCFlvRLJ0LXHkJWi/bUy1I','user','ak_7b7701883b150ea4','2023-10-20 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$hezu0jQAHK.T7Z0Oe3btnRIdKeJrfjtxL5gpO7RRewweMGGxOZYlT','admin','ak_44b6eab6e26030f6','2023-11-05 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$wQOwCImMFKJixdE671wZZFUhx3mmAgVHMZ8Nrv/BcN863iQVUe9tf','user','ak_c64bd669f42b4d08','2023-12-02 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$fNckNO0LhBV3k0p10buNVNG/mjiDCXx9EYhzcWUrL5a7AdXX3josR','admin','ak_8fcd77f45ec53efb','2023-07-13 10:15: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=41168;

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


