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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$H94D/C6l85JxLu1mAHQn.zQ6APrcQnBqHAKiJSX7ZvDet.VXGdN3r','admin','ak_43eb77472fd4ea5d','2023-07-16 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$wdBeg1HLN7iNXByeN8WbIH52fiVZrUYxFYl8JYyLdp4CKcaJMMKzY','user','ak_54f41097d8df2327','2023-10-23 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$xVVwy65WO0KnltUZlq3ZMQo76VAw4OJqFOPZqrHRdgpYrbsymDVmP','user','ak_7fd23564c93d3563','2023-08-05 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$YhCV9G3Eh7pXdmfCuObuaO063f8oUJFvP/CowdcTAqMhidCHyWpAo','user','ak_514148685c6a573f','2023-09-27 10:11:00',NULL);

