-- Host: db-master-8.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$M6kVExG4r9fKWJluyhl0dJQ0xf.bHH.4/PytLylLgl9h9dEfUG31Q','user','ak_ed9bab4967cd232c','2023-10-13 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$xY8XARrCo4kjGD4tvzYZRcvP3rCQbrFSpoPWFjovVdbEgVeSah.3M','user','ak_809c1fd19f481f6f','2023-03-06 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$w3IJa2cIV6AbnCv6bh5ivq5RCREtZpNUauFfDYysVrhFe9PAwi0sd','user','ak_ba1d1af263a7fc46','2023-01-28 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$C0KK3So6AETFnRf57cd1sAD.G7cx96KRZiD8Tz17hxp9XU15SHCSu','user','ak_027195c92c9211c0','2023-08-03 10:03:00',NULL);

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

--
-- Dumping data for table `orders`
--


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

--
-- Dumping data for table `audit_log`
--


