-- Host: db-master-3.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=1660;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$2o84TxIMgJV48BC.lEadUI6s7M9hbpLEWwGgGRN3ZKA85WRWRBolo','user','ak_1e1fb7747d203173','2023-04-17 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$rx940mnDXyqGZJkPTaARRcRm14NndVc2UasIcT8ySW0NKax.g7AEs','admin','ak_15305ce3a5e101d2','2023-06-14 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$t0CluMcZcQexi2D8AJUPbAxRxZKT3Jzzqr.EMrsSVnpTRAJA0EssZ','user','ak_330b46a975777cfa','2023-06-22 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$CBWgjwlWj4m/ls3kjwwKOMOLYp9ddDSc2a/jqjQviV9sEnbrtCxDo','admin','ak_b053cb9c2c12f37d','2023-01-05 10:12:00',NULL);

