-- Host: db-master-9.internal    Database: main_app


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$SPy75PCNo5cDtI2vhBxOvGOTOjwPIrZ5tSRsku/ashT2PpHnKPcSY','user','ak_2f5170a55c8b5b8a','2023-10-08 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$S5jH5fxKwpbdCZcz0se4rEvTTlTj5vcurgDfraija4pKoTHYB3YDn','user','ak_7aa55ba51ae0d87c','2023-02-07 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$6cblF8OObqEQicOsmpH.kHuEQboHdCo6Gvh1z1DgBNHNw.K5aZ6h5','admin','ak_0b4b75715c9d9689','2023-10-09 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$y0CIlX7lhBMNpcl4x1OP1eQ5nN6dyg7ELselae7VaUAS0w3PwosUd','user','ak_4234d8efa510254c','2023-09-27 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$BotrivAopOMFADRX1BDmNGBRdExg9aBYmRpO6nqY.RT.3O6r9oRh4','user','ak_f976b9e6a844cdb8','2023-11-08 10:05: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=26230;

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

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


