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


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

--
-- Dumping data for table `orders`
--


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=6859;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$WRjgJUtSsslk6h8j7m4pvYBFWAjet1NuIFBY6YoHxF/D3gjea.w5l','admin','ak_95923601a9480c2c','2023-10-26 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$HXSH2k.lqij.LHpnWaleWY3l4y8Sgq6lVZGQolwcvSIc.QP59C2iZ','user','ak_2355d126c8c21ff4','2023-07-09 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$52cv8x/IssaszXlVC0HLw1kT9Ue63f1OZ0lkkSeW1sdRdrCzHQhFX','user','ak_b2e3fe719288d580','2023-07-25 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$g7WlhNFoZbYgWX8x8SE/O7uzIokMXWyR51wD1rqTW0mEq3x3zYQO4','user','ak_dca8710c9b663310','2023-05-22 10:09:00',NULL);

