-- Host: db-master-6.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=48488;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$dkm.nnEKNMkMOFzy37QZJiZM313GIEm5ZdSru968qroEgajO2LFdV','user','ak_8d615eb85d7aaa75','2023-04-27 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$cQ5SGl4a/eU39aaoQkMZEhonHKlAjlv7vsndQ19EzTmiDUsriZnVQ','user','ak_d72c30893a08411d','2023-01-21 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$hSYoM6QTbTYu/2l9TSLAw37vnKkjeujpC47DqkabF67tl/8FXAAha','user','ak_9d05c5a5f6597365','2023-09-04 10:03: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=15672;

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


