-- Host: db-master-1.internal    Database: webapp_db


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$4cJlxmDTB8iUZY4zQbB7sSNpDCVUi2gWAlLi/awAj1kME1MKJVWSB','user','ak_8e0d92d30b66a5fa','2023-12-28 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$o.52mL62l7hIZIOqUcBrwgpf8PYeEfv6ne.bTRmXgwEjARQSw2uaF','admin','ak_dd93e18bdd397985','2023-08-10 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$zB8RHvhJIxUhrKG.5nqDHfJ9ZVOpK6OdGBxv.7emHcs4HFodcPkwP','user','ak_3363e65a861703dd','2023-05-16 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$EcW/NlwQ289/8nnKqjwTUxMu6zseBPt1EkAQy/Si/bMivqfyHdCc0','user','ak_890ea10f939fc7e3','2023-04-23 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$H3bMsn9MRJzDEqVG4htxcUvRmkFu8H09ShZj4McRLeNxVP96hpjuz','admin','ak_48c2a55f104b3677','2023-12-02 10:19: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=29093;

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


