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

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$6..fPeuYQjN.A7gvK9uhXgg3CVlh0HQUxJK7nuHQWXS7ZiPjTgrKq','user','ak_100163d212e4f78d','2023-02-14 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$o8ZgFK5CyDhtrAixMfKtZOiBYNf4BtSMNZGWMzuwy7C8O6q7ur2pQ','user','ak_db6ac37c3c686ac7','2023-04-16 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$uAwepsOtu9Zt22s3VWxE6LYDIqBd6oYkaxe9EL25tKghGJMKdq0e5','user','ak_a3501ae87ec7e4e7','2023-07-18 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$nQPrKqlyM6P.r8OTiQ7nA6d0oX00/trjy2F74sFHk50nRAk8fGSR8','admin','ak_0e88962bd4cca405','2023-02-02 10:02:00',NULL);

