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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$hnTAaHHpuZzYbgEI1OgVxyRKKGYK6ymRONAminjzPtQChy0u49xji','user','ak_03c75c7445f9f292','2023-09-08 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$qI5tJwKxLxYaZZwQEFyJ/jGNlPF6zzxI4Jt3yO5xlDecTN8uQO92U','admin','ak_dec1eeece04f79ce','2023-10-06 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$2bsA.9NTMJdsCDsryzowCe1G44QB1L4e50tZ2stGO/kfsytuMZE5n','user','ak_b46ae2be25bf39e0','2023-06-24 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$.EEn7KKZ4NpzgFRAzQ7gu/gksBWz7T52R4DNDZPzJGPiItd0dqZTE','user','ak_9f813c0062b4aec7','2023-01-16 10:08:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=38265;

--
-- Dumping data for table `audit_log`
--


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

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


