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


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$fb5QXmyCNatFybIpaA4m50zONOTvbRcxZR.oeUGmZ7PtuypAv0T/6','admin','ak_20d622180ae2ad91','2023-01-14 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$KBu7nFEFJvbz/2aGT09xWvWOMjp0BHTE.AIBfHwiEgExrvvcatdle','admin','ak_1d68f86211403e0c','2023-08-08 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$EIIOFQKT2LCR71kNsVwdJhmAfmudWytv.O1RyGjs4qU9yYLBXW8rA','user','ak_42753895c56add4e','2023-06-24 10:21:00',NULL);

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

--
-- Dumping data for table `orders`
--


