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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$7gabYyBgXFstIdWHmeS3p5bbez1PuOOMALcwmUa1r8Dwycj1Ialsq','user','ak_aca9b30fb706d530','2023-01-14 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$oJxfvykSWIzSZIsPwT8s1AXvq5TbI6KfYCeluUHdal0Kw0kEruxoJ','user','ak_c22b8ccf30216be7','2023-08-08 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$r50lrb4r3BB5dhua6TalL4Da2I92hm1B66pXBDCSxjLD.1Zp8Qg5K','admin','ak_d2724d6c999107fd','2023-12-23 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$RJWTG8MRP/gy1jClYaFD5bFkBQNMznZ4hji/y4/nJDtKa73.fUWk3','admin','ak_dd925e9796028c1a','2023-09-16 10:14:00',NULL);

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

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


