-- Host: db-master-6.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$dwLUG080tTNu74UDNw/Ul/guVo6ujylACwbCmrvY0DdzMiJK8XX60','user','ak_e6313de882c9501b','2023-01-02 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$wsWV8gu8rTOoUF/3PByKeFBvgQXhoSb9qXljgswQKPhuUkvbES/sk','user','ak_7c582227cc2c4413','2023-08-25 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$CQ1OwtkLoWKZioePQ6o83FWhupYjI1/qJEETfjCxB.YIy0vHoH/sH','user','ak_eec86d0457bacb8b','2023-07-09 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$HZq574FOW/uqaWX5w55WZq5YYWCChZKrO9WSCWCEnRjadGDZ4KSkD','user','ak_dd2584b0dfaa1e61','2023-03-01 10:19:00',NULL);

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

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


