-- Host: db-master-3.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=28558;

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$H9hdQaE56KOPFVQD3T0n47drcvhpSf9AQUd6cOpcD3TEsCso6NGYn','user','ak_c4c7c3d60595781b','2023-03-25 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$fJzvS5zgAfsgThJyMRHvst9LXU0MMYMWweJJOw/IhLfpZOLoPqg8T','user','ak_c04f767a66efe2bc','2023-09-01 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$B9hse5lAxX3cL/UhdTrBicMHpQJ.35.cLm4GiZ6LZQid3e6uKdN7G','user','ak_dfd6001bdec64933','2023-02-24 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$vjUf8sfuAzC/bXRKvC67XlWYeo1HdlSWg.O3QD4zrLK4xduyQ/eA9','admin','ak_477376f629050639','2023-09-23 10:16: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=25834;

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


