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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$.ym.Q/wJS9ln91u9tjyb8yRZFx48p5p6ZpcYyHxB3352golDG51Wu','admin','ak_5b1b3da3ee183f98','2023-01-08 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$Y41mERRPsUj/nwdcQnL7ed7cqLX/WkfD3vmJFQ.GglzAuE.pwbGdO','user','ak_0a16341b8bbc47c4','2023-03-07 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$TVjU4l7CK6L0TE./ExXsMW3IfOvjt26hN.cuyljB0XoLzpK2dia69','admin','ak_1af7a7aeeadf9f99','2023-10-06 10:12:00',NULL);

