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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$9WvRe2E/ihOlz9aBtXDOhGZ3dTdNv.fOfDjW6YQQhkvU3QAahdEZM','admin','ak_f7b3c411cee70a81','2023-10-17 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$TjQkj7EDDDIQhBiABqYNNYmD3DZDpJVr9FEp6n4tqtP6yV3Vg5o6k','admin','ak_21186e3dbf4cc275','2023-07-21 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$eM5JhkFIBi/fnQ0D9aOWliPQCG0DZmc5DZoe.k6STPpSntQu8Diap','user','ak_f6530c3d84ac2187','2023-07-16 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$WDIKveBco4LDWVQYxSbKVcG7KCgRcENUMwCNhFVRzWplMvJwNvBTs','user','ak_c0034a0441b5fe7f','2023-11-04 10:09: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=23132;

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


