-- Host: db-master-6.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=49315;

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$1OGBWJ.9JMjK2LIBI9XwnsNEVjNHubSCsZVvI8v6G3XJZe9bCR7oD','admin','ak_8453c3a82afe9792','2023-02-23 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$7.b6SdfWywJ2dT.AfSIEPidAm7tROBZ/1uaVJlpxIK1n6ZfBM082z','user','ak_35b9cccae571b3cf','2023-01-25 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$DSr20dCh/uwjMFnCvJI/cWwnQTpb0kqSF1oENT09TLX1nhPby38d0','admin','ak_bf9c506f04f2ef71','2023-01-03 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$xD3iLi3g8QQSwKiHoQC8ZmjP82H6dQUQlm7URaemSEG23ekHJ9SGr','user','ak_bd8ce165ea25b8a7','2023-10-24 10:20:00',NULL);

