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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$fSa7b5RvP1pCazcLI/sEv6BmZf8hiceQ10WUxKQI3w4EbSeBmRZkW','user','ak_b5235a4e6d1999d1','2023-07-02 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$ezL3hoYwrlprJbO6VJgqh9xSqv1xv5Ix5/Q0qDEgd5OKFngyhIAZe','user','ak_a4235593c88993c4','2023-07-27 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$fAhoQ/9ju/mFUBE6m3W/eMG3Awg12ZOJKvCw.rPfaqG48XqTCgdpr','user','ak_6ae04268c20f8375','2023-06-07 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$rM6qyuEosvbxV0W3k5ffoKh5n/4FoFvSQeoi4O6KaAYWs3wQ8aydm','user','ak_2115b261955b6e12','2023-03-16 10:01:00',NULL);

