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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$sy44ELf6/Oa4nKTCbkzCgyPmQYCycEEGCkdJnmsda2AS25b04tPiw','admin','ak_5463694080da5957','2023-12-03 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$jgy9Q44Uu4N2GMlL7At.Kra0ouxdjLX8gqqjg6w7eNnh/ocd83Nb5','admin','ak_5055079948307ccb','2023-11-25 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$zwzvH07LEAVedhUg.RLcwJdvordd1kD3StaHacyiTGgIr4vqZCEd5','user','ak_c9e8d783529f5ee3','2023-02-09 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$aojmB4FZW61j6pSGwG3Zud1/.Y6ASkLA43Miw.k2KJUS.9LF5p2vk','user','ak_5011f43cbda49a72','2023-06-09 10:08: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=13868;

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


