-- Host: db-master-8.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=7142;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$s/u3lt8oINlbVLM5PZiL2yUPRAVZNk9yk9ZTjHru2BZYHoQfOCF/c','user','ak_413dc92f45e44094','2023-09-10 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$xL3OH8EJ0FptvQjbBhkqX3iet4JGIQ2gCBfVsEQBX5ixDa9Tio5Rr','user','ak_95144f701e7cd9e2','2023-08-27 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$M5tQfmDen47p/dHJtK0BhiJgPUepnbpTUuPh7lDo2rijDrRzp97xf','user','ak_39f70164d116c59c','2023-05-12 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$2pcdxsWtm5HyAudbJuYRMiQmG2OvoXBoqXJKCOpqmAwidc/lwWC2n','user','ak_c8a72a8fb71762b6','2023-11-04 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$8Gdy9B8GPIdHCjl8MmB.vAHpLB7n1cWHe94SzvLljkOvMEQDZlg9S','user','ak_511fa83dd69e4448','2023-03-27 10:19:00',NULL);

