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

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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$i1AdHlwVMAsN0z22oWQjqRRHqIf/.1RtS2KAG1bso9bbsECwSQMcb','admin','ak_b70887295bdfa7b3','2023-11-09 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$lmBYfW/vp6nhDA2McimghWJD/XgsliYArrzEz15gJifHHNdEL52cU','user','ak_6aacaf0f0d8d42a9','2023-02-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$Qlqytb8bobK0CcrMiof8XoFzzuTbsk2AUHTafQoA717.Nm.0NChxK','user','ak_32e672e0c59e130b','2023-01-09 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$aeAXziRIVTysM5AGHbThg8q7iPvAuYf57WWa5Ix.W8rCr4gWTKYeV','user','ak_1b652e9352367956','2023-03-28 10:18:00',NULL);

