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


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$9PgdV1qUQ8GcZaSqcMwn4V3B1zC2yPW690CzRKRGhFGKdFPEMb63x','user','ak_aecbf7c1a8950014','2023-02-05 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$2kD0Ex8oLkUsKjEG3fG3O3kBolVOsgV2pur0nTVpd6kwZi17BPItm','admin','ak_b1a673385a1fba4e','2023-06-24 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$Gj6mpv/GziQExGFEQSQGOoIaYZzBZ.O9nFD/SF2owkmfDIi9ONQPc','admin','ak_8de7a0c17df04bcc','2023-12-26 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$r7FdQzR2kQr1gbX4uZsrb0DcphZqkm8cz1wB1GZW0MW.W5216xxcb','admin','ak_0b9634ca8ec66881','2023-09-10 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$lQEEpwuvg1cRJS2crMtfyoJGa5VKkqhWWBly4P0lCYp4cejSwJw6A','user','ak_1f76a21042eef773','2023-02-08 10:22: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=29554;

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


