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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$39yHvEOElnit/cish4YoCFUTA.EMNEHuOM1QbMUGJCy4u/h98xyf7','user','ak_ea12710893e34ea1','2023-07-13 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$cBeXXjYgsjB7mlIYPoRmOm23LVcizG9.g.bwoV2VALN6u0wuJcaVP','user','ak_abbeb7df859e2e8a','2023-06-20 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$Vkz.vUuJd5SM7vnMNmTWdvyrfu3hx509UUICZaM/hgr16eL2zXjyw','user','ak_8a3e5cbeaf825e74','2023-07-19 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$Kpez1gxqMskBFU0rqL9Rdx6YZPmEL.Gg8Csz/DyvPvu8HA7Do9XHJ','user','ak_9415c668fd0ee285','2023-11-28 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$EVU4xkAqgubh7.ygRnwBdApEhIxi9jOWV2zVcpLM7UVffTYm1P4ix','user','ak_690c785e5103cd58','2023-02-28 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$neWrbkzwcNu1JU1OTJKlGp.dEB.G7z1jno/uLgiCZF9YgX4gAvnZk','admin','ak_5e18b2a66ca55aeb','2023-10-17 10:20:00',NULL);

