-- Host: db-master-3.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=35326;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$Sr.MVI.mvQJC4SDiHpZtrRBF.fcZlE7cPGjnYchzSXcBAsnbHaMdx','user','ak_640ce4cefb8901ac','2023-01-07 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$ckfvJ7xEgTQBh.8RXj3aYcwoZdSxsrVYvb7Hg32uufeF/j3CmrC7C','user','ak_40cdcf425be82f66','2023-03-19 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$dl9jJAtcv61CUzB7DbCW0d4MksevGNoPCSXu7gxgrFRpEpVyzuFko','user','ak_2414600c7c951c06','2023-09-17 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$Gk4Q.N9z0ONpYCGqbPq/Dg43Jy3li97Erd1KfhQhk7uqXWP.3IHi8','user','ak_d95fb7f542ae6e98','2023-03-21 10:23: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=2677;

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


