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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$aEmVgD178qd5z2MPuoLtNPm1Vh/j0WbOcoH6skWdqOarP640jVTFk','user','ak_ab2ff57373004eef','2023-04-23 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$O9Phk5T1TAcGixjyO9hkx5b60atVBavLAKSbVcJU6hm7RQFvN3YtP','user','ak_75bf950f6ed2913d','2023-06-19 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$pZT0xCtAg30ibo8qq.B.LRrya8BxWVl9yxy6tw7TNbZf3GRg4639d','admin','ak_3370203a1b551823','2023-06-25 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$Z0m.b37HpdvedF08cD99DDcJL3Sk0C9bqeEh.7f462ohH7agf3loB','user','ak_88e4245a19d4113f','2023-07-12 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$zfHpyFcAAZEeb64H.dZCdbBC71.dczolII7NB3wbRt1QnfOrCDPza','admin','ak_22313a2d21b27044','2023-01-13 10:04: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=24149;

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


