-- Host: db-master-2.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$3OGMMMuCoxJ/pBnxi3yZjWyWBsZEzbztQw6zHAohym/Feooj0OUS2','admin','ak_cf977fbf7883423c','2023-11-16 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$YU6gs3FCU3Xx2oCqw9uSsRfT/DcZdCsWeCkY/bINHB2UcBeoQ/xzl','admin','ak_7f331e5d8382e8d8','2023-11-23 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$7f2fo9pgexvbhtxpz4LGkiCJW8rJVFokizJrUUAbXyP75qkSFCiOn','admin','ak_c1a06fcd549a85b3','2023-08-26 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$K3beNlTGXJX8LGjmJkV.fQxHuf4AaBuMkMx9z3Advt1cqW4LjVtNS','user','ak_b058dbac1ac735ab','2023-01-23 10:18: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=17259;

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


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

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


