-- Host: db-master-1.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=15929;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$FCyZn0tNKuCi7yTfvnOWFmWq0475kf7Lm/2P0I1QWv0VMkpRTa8Ox','user','ak_cf5d1269217ee43d','2023-12-15 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$0QPcKf7y2WNI42UmmsWSHL1WDIpI4J8son7AwusqifuiB.Jlc4ton','user','ak_c7c9c0d3710d965e','2023-04-18 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$SDWKGwIEClKthEQfjXeT9g94iMxPHJrGS15yON4Z/S6phS8zjnkK.','admin','ak_ca1a5117543c220d','2023-04-26 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$TcVmitzLpEhzyLgk2FjJHQKcFsflkI8WvC61bm.Bm8AUzLmgwf7r7','user','ak_d3686043d2f04131','2023-04-25 10:01:00',NULL);

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

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


