-- Host: db-master-0.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=12477;

--
-- Dumping data for table `sessions`
--


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

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


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$jJLpkCLiv8arMWciU1rwR4X7qeHoVLcMu8fDz1WglYOYA0nmTPwVg','user','ak_d473e0ffe51e6fe3','2023-08-09 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$0UPzqIT.sgS9nupGUnM202fTq5ZA.QiZZ4SwlDI.Cot4dXPA/WTlA','admin','ak_375f401b67d02b21','2023-11-15 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$OkdgQjQK.moR5jtnLZK14pTwmrRgs53Y040nMUenKcClsf3gJTL6w','user','ak_48eacd206dd2b486','2023-10-28 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$x3oUv59z/F0/pO2XPK7OmARPRDGRR4rxck7PYXZMcyf7lKii5bLft','admin','ak_dccc64c44870f465','2023-04-06 10:13:00',NULL);

