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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$lECsnwAPAc.SfRwTCjMTqyBk7MDNS102ZkDYZeXVf/FbSPhHcdR9H','user','ak_e8a4d83759f54320','2023-11-10 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$2XPJbdxMpe1cbIK1QQuvpaQd21hDi7mGN/SAhbYINzRjh5R1OQ7hW','user','ak_1afcd672fd34b5f7','2023-06-05 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$94kcjb2NEzjVB/UzBp0jZqDPsA12ZWPK/7hqX3xjHbProheGr7ipx','user','ak_df8d06b4958aed04','2023-02-14 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$pOrI5IHsJXWY2hCg0P5AIeYdn8rDtsOvfs/ADbCdhLl2aY9ZAAhki','user','ak_7a7ecbfb697e44a8','2023-02-09 10:04:00',NULL);

