-- Host: db-master-4.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$1J9qbgUpIVyll2BrNploET5LMNDUgE.T.8EBUbdGtwkwLZNapy0Bv','admin','ak_2307c0fa988f0436','2023-06-04 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$RH6Oo0Mm7uTxuPJ6S/GXYKCnLSm1N8i.HCGuxjVWPJmJezUjQvVtc','admin','ak_d916579ee7daa2e8','2023-05-01 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$5Q4zJ3jl78zCYNs8Ve.teLNG6sEF2EqOzhTl55ZHtSSsrl6G.tb4l','admin','ak_541fbb08f3c65416','2023-05-11 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$9Qz6Cly74YYhhoVDYPyT4NQhR4WaUAELEwZ6BPI0jd9ZunK5/ez9N','user','ak_ef71d016ed072954','2023-01-25 10:13:00',NULL);

