-- Host: db-master-6.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=5783;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$JrqboEen9Z2BU389kR6EXABFu4gpITZXAKCDQNT/reWGCR92yJry3','user','ak_42158e0b776e521d','2023-08-25 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$3G9zCCDyWIWlbsnnrC3IABQL7uqq1htsyh4g3X4so7GfKlTUP/jng','user','ak_13dfa36f25455d79','2023-01-14 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$tpzBAqMy8H24X82Ht1w80CXvhwccOW4bsLsZdiSoPRK.mC8.H1j9K','user','ak_a804d5b1f9e30b67','2023-01-21 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$8JwqRUp4ALI1FWMjJqpOQ9ZHmojBIceh8RsLjaKMfD6DBTaiJVCS5','user','ak_72cc173b7b6c7efe','2023-09-26 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$h5aZHzlcx9hU8mehdSu4nH9OAJRBXNWC3M6otZ2VHkkE4gicNVLmz','admin','ak_c952ea921c62ba9d','2023-02-01 10:10:00',NULL);

