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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$5dW6HGCjpW/IutE8sbieYec./RtkEoZSkCYXhjbfvmxh/SZ7TZQzZ','user','ak_bdc4dee5c2dfeb2d','2023-02-20 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$P6IIn.fvy8grVAiEgIcDqWgJhkyrjrt7Qhgtj1qUEp4QmRbuKIDa0','user','ak_5c0ef4730e47be00','2023-07-14 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$IXGmc1GaaLUP0Ob.lLMpAg85g.JRJKeHNGN4prqQT5oA6QbDabYzV','user','ak_2be26aac31a758e5','2023-03-15 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$UuYwG8VdcPZiu.L3yGbFjWjHsQcVPGjT0v5So8Cg0wyNFe2LkOwGW','user','ak_43840c140973fca7','2023-09-27 10:11: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=9098;

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


