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


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$3WygM7t6bw2o1/5PouguusK1L/sMZRwft2MgAVQ1og2IMwBxJ4dPz','user','ak_6f895908737efafc','2023-07-26 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$0bBBhjLpwFHHkRx1DeDEQW0trh8.drF7WpN2VD3hmOCQuZ//AgE.C','user','ak_ee66555bd352e900','2023-07-08 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$GOvOY/3jnOa.m31ZuABi2QL0G0uWkUuOSQcutmTGnzVdXu9Q//Lzb','user','ak_90db9a955d134594','2023-07-05 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$gC0nlk0CNOM7ZFxCQuO9nH2Luk/TPpdyvmHdNsAjMV0JqlEs0Vn41','user','ak_5365b3ce362c8d78','2023-04-16 10:03:00',NULL);

