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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$NTHFD0IyaEnHsJNUpvqnOGau.xkVIWx7XsgPH3E1d9/T7WoOIfd4e','user','ak_3a0efa042cb3f6f3','2023-12-11 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$IUguuY/mISBBx3kRz3Sos99E7OQU2XynCbOwVfwlHBZImEAtJRsZo','user','ak_33715c837b7ecdba','2023-04-12 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$clqBdN1UIhzbLr1eDRM7L6J2jvrxdlOgqABBX0D.4/7OdziTJrLhC','user','ak_c460a8573380f1b1','2023-08-11 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$0RPk9isD6fWb.YOxWZMUEEKHZNN38ZiDzWq4tJ3rYHS9eRv4/pNYf','user','ak_a5cea9ffd1457460','2023-10-03 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$KVydevezeZPMjYFhLRRe46CYG4VOoFXwKUYlF88UJEqs9qRbLCbqi','admin','ak_bd064cf8a4c9a322','2023-01-01 10:02:00',NULL);

