-- Host: db-master-9.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=13212;

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$Hk7ZvJkdfKDxTVHr4Sra7xx8HarIqpQJ/MC1uHUH39Qwh.FTahyV/','user','ak_c071400db5f13f19','2023-05-11 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$x70MQYG/z2B66hyxzasJKdtmmt1KXS5tC6VwS0qn6h0DN9GIpSRUH','admin','ak_da24f89581dcd3ff','2023-10-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$qeHyd8J4h55oOLw4pTSxQF6FfAq2XoVDvLk29AtKUb3MQ6bvagXAr','user','ak_efc20ef3103315c3','2023-07-03 10:20: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=24812;

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


