-- Host: db-master-5.internal    Database: customers


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$xda3BHZlJCKZbQHG1Xp/SWMyS7.jGh65/E3hxchgL3xv26AaRJ6oB','user','ak_4c1c8ed3d499fb0c','2023-03-10 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$iTz1Mee74th.ua5CngZe2jtHGR8IYF9JKR1vQ.wUMBFUl/gD2nOka','user','ak_403b261976f8bc42','2023-09-05 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$anfTKK0bYYrbHLqvuqjGqhdNY5fjsyc3nTi6CKIb8MWmbwEaOaZWy','admin','ak_68cb758284bc8110','2023-09-14 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$jkLQATwhNBdKTUsmv22oydzXRVCRZUqN8UfrbTYTG4Yjb7Fc0kt6m','user','ak_1914037a62a38f7d','2023-03-02 10:15:00',NULL);

