-- Host: db-master-2.internal    Database: production_db


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$bhwMYLiIujU25ZHJv9/5qDa4uqWq0EczLRvSIkyA5inDgkwjoGwyP','user','ak_0f6b38fa648fc77b','2023-06-09 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$XcbuggmxPtCKrgd9bWX6QIJxCOQlPusXsaOcllP7mBPzVH2L3w/8J','user','ak_9fafc087426d239b','2023-10-24 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$sbH1jke1YLmYRUOGOQoH2XleUgc3qcYfx3zwjrOQaJ07ZbpjYLBsM','user','ak_cdfcb66ef4e52195','2023-07-19 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$Ph7fwILCg4wX2DyTxtexeRFMm3J4MFTqUo6QFQZcxovDEQd6DyO6o','user','ak_f978b0b1db92ca7c','2023-02-09 10:17:00',NULL);

