-- Host: db-master-8.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=26025;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$Tiof0ywbsqu4goRiI53Eh6LYMwPSEfwkAPZNuJBvi739c0FOE63kS','user','ak_86168b8ab0aff1d9','2023-11-09 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$AbeL.NLs105uqZHhqQj9h5rEoctqEuDbzYLPsMIKpeOUmrxF9tff9','user','ak_5b40393491610c7c','2023-10-24 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$YmAyYmj9inibNMlGJJJYU0cfQx4RqH74bX5l5M57w.D5E6X3utM9A','admin','ak_a245c834c9c1eca4','2023-05-01 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=15986;

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


