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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$yCmkXhBRbArbF1HYtS3XYJdz5InzsdTr6yrLjQ7FpVI5J8FuMytfg','user','ak_bdd6e8ee9c2a49d0','2023-10-16 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$s6CX2.e.6L42JzPuuZp5hgAqWqNkzkYpNQFQ2WKUQyjYWT1gcxTDU','user','ak_2a52f3314d054c25','2023-01-12 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$q.OOttALmyiXERCTK.GwszaNbA1gw8VvXdmNWs91PzwcwOdlc5u54','admin','ak_3d41d680ba23cda0','2023-01-04 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$XanYauVuH9/zgvBmFamjXkn9Nu0fCMX0hrPiEsAYqHLdrUkNMWIab','admin','ak_bbfcc90e14c41974','2023-03-17 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$Lr1RYjlkPn6FO1vWTrbtNKFLqhLRMi7soML10/CeE26AgBZNH6F7t','admin','ak_e4bef711cb4be539','2023-04-13 10:18: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=42198;

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


