-- Host: db-master-5.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=35566;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$vKUGeMYp5IGnzj06Fxs32oJEHs/tM0qgkxS0iIX5J3zso1Ovs.X5p','user','ak_668b9a632c72432b','2023-03-22 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$/HYYW8.6O7aF/7J3mpw1NogehpM1Tup.SEC4ND5V2CCWyUoZZQejM','user','ak_a96766c5b1a73e0e','2023-09-08 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$wS5t/TmZ4kF/YAajuY575r7dx2zkmt3E3Dyk0DvY65eMHfK8GtW/k','user','ak_16ec1e3a3c4c0e65','2023-03-27 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$bSfXWPRB52Gs1bm8f9TmbumhEbBGbQnmkeMoT37uwRCXBvD.B1nm4','user','ak_b948053ca1461b82','2023-02-05 10:22:00',NULL);

