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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$it2LG2ijyVz51ZuFkw.8VHlYsO6hfvHWbV0aW8ecNEWbiEZBkI7zF','user','ak_5b8d28d52d718671','2023-08-22 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$uD/qLHoLEmPXI4XsOEenApewdVLZmL4/W6hyN8Q0g0nl/iRFJHLPY','user','ak_6a3570c9e682ceb1','2023-04-17 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$YtIFSbKT4oX//9ESnR1rVNXHvlzmgClsv5Gw5VRRurSg1pIGoDOpq','admin','ak_b5da4f3c42d81651','2023-11-13 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$vTdnnWxrB/3wpbLRGMyCXG4R7hQWfqmxJBI1bdOinA7wegdXsDof3','user','ak_ce695aa31c52c5cf','2023-06-05 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$CaH3B1vpp4zvsXQpaxOohX1ygt2OdHJxetQpKeP1IUaiZys2AGGiM','admin','ak_694b6519303e32c8','2023-02-08 10:11:00',NULL);

