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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$8MIzh0zmisRAosaUsDxpOpz9uzE1WcTJxXfsf7QH0HWs5RlcBH68N','user','ak_7e3a725373b07732','2023-06-20 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$08NRAIOQXCr4ZA/mGFYJXXlbAS1IDsNhhpbv4dpZK97dXWSh6QR5Q','admin','ak_dd799644ee0f61ab','2023-11-26 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$2mslkxqmHHddr6wwDEez45nurjx7y2kNQR21U2DV9GopFV4wp2RtG','user','ak_2452c866deb21586','2023-11-25 10:22:00',NULL);

