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


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

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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$AbnwMCt12b3OM76LyP4TIGsaTcclxjDUYbHdqlredswuMOjqq0eFr','admin','ak_e095cbbd42dff4aa','2023-11-03 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$gomHf0J4iwLFRXHExMRQ9iaNfrti5sRCAupSoo0P/5CjLNKlkqYun','user','ak_f50d859c9f5f584c','2023-11-26 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$7eLW02n7d6WAYEZUwQS9QeMulS7kKGcu1XuG5ITsw7klZUFaM9JtU','admin','ak_43fea6ac2eb15601','2023-09-03 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$xAiseVd8bo9wK22/d/HzgRQaI.bwo3Q16vEcy/OP7V2VjLBghb0PV','user','ak_865d9bd5f5400b73','2023-07-16 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$wnjbbDmRW4Qsay0x9BUvIyNaJ9fT5eDPY9rNjzagIC/twsva4A7ty','user','ak_e021890c5f430285','2023-06-28 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@internal.io','$2b$12$AM.7azzrijUvyv3FqhJceKcdomTZInifnEdNSOYKDzJIZb9IarAsA','admin','ak_f1f377fa2306234b','2023-06-24 10:23:00',NULL);

