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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$ciTH1Es1TXQDmzLm5dh6TyFn/hexpgfVqQqGHjwHisV3SjmXDHtSe','user','ak_84e3178e3eeebf5f','2023-10-27 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$xXuYMIaCMThJDp4A7LorJHns089yD5.IUYQ5Pxv84uq37ekE1TxRK','user','ak_37e46a41b7e757cf','2023-12-01 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$Gqp/Tn0owVnGFxJe4sSsGrveSoZVdxVzY1jAeiwxbQlpm.VjXKdBJ','admin','ak_cead7e5fa3bd157a','2023-09-02 10:12:00',NULL);

