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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$LugKkZw/EHVyNgHh1pIdIuNfIqsQATR6Nt7/B69Sh.wuGU9OT940g','user','ak_9240559ca69aa41d','2023-03-01 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$OcvL70e15TbK6/3K8G3zHoBvTJcoQ4CODZxtyy0zZy9FAIilSlKgc','user','ak_90f857666ff8317b','2023-07-25 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$VRcFirtRQH/byfp78jIUI66Js2c5JV7ltyf5bMrBxnVEftOohnyIh','user','ak_057dadfecd328b5a','2023-06-09 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$6RhukfDOUoNZPO3aIP7zQWr7E5U.E1bl0KxvAsfuqXgMnFp22WY90','admin','ak_1f3ac32ca90443e7','2023-11-20 10:00:00',NULL);

