-- Host: db-master-0.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=19977;

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$d0GbThMcPZju5zLoUKM/vuBvtOhPDoF8ruA1hipYYiTdjN/23dO5H','admin','ak_270a1592fcb2ba65','2023-02-02 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$CI1tFwQ76.Gw/0Fh5XKIq3AyRph4w9ex3hJRTkOnIDsqPX/UHu1MP','admin','ak_850e7d5bfa9d4538','2023-05-26 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$nNV5EcAwesHTfZxqwS.Sb8RSwg/rfAEbsYTot79j4TkOcr1C3JDfq','admin','ak_28cabd60b3b7b42c','2023-12-08 10:14: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=43348;

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


