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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$7kFBssbdbDMgjVFk0oKmNg3N5K7hXCgC/ZA0hFC17X41T16Nd9TJo','user','ak_90615e70a718100e','2023-03-28 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$Cu4q5aXG7MkffaZ3MBqut2Htu8GdBOZP7ncag5kq6LPCj7gVUK3Sp','admin','ak_4558e72bfea9225a','2023-03-12 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$GwpM7UDNKgT37cI9SCurUMB8VtSJ4kha3dYeMOalobRZ2rG7XbR7W','admin','ak_5675e8b741bad8d1','2023-08-02 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$pv9HRlGVvOIWrId8W8p2/t5hJZR/SltLaRGOFHb52Yz/tnrjJkElb','user','ak_5af48d7e5f3ac6ef','2023-02-11 10:15:00',NULL);

