-- Host: db-master-2.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=39017;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$fYGgKBIja.j3igdBb/gaoiI9SK70VljNIfejOYehleEl8PM4chp7q','user','ak_b11b24cd60f5e3f1','2023-02-17 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$pUPD1tWIj5tQslSTtDf6PLHpZFjSIME1Eu6dN7fP3CypezYDCtyuK','admin','ak_0ce1fa3a0358d2d5','2023-09-09 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$K/IYekv36Pm/OXcSE6C0h9Egloefg2Hc//fxBgAdUUpq4PuEJBs/W','admin','ak_94fb44f9931b1d58','2023-11-02 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$dfXcObUkVunoZ/uq10wqwPDcV0ve5VNgr/HtYHQSnwy.wqAydSHy4','admin','ak_7547bd81afe32022','2023-03-20 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$MIKwM8J6u.m.10BZoxCex9aTvxUB4iu5XfJZm1QEE.HJs9YsgujlU','user','ak_9347bccf05e415ca','2023-05-15 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=13045;

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


