-- Host: db-master-6.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=9780;

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$5JludMb.dWuL3tZScAq/UI7Yno6mOzW8Lww8NwRwJmZervXYQ3R2W','user','ak_427fae1bfc539696','2023-08-14 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$iJxcPIPsWDy9/LOG8.DX0pcp307yXrShvP8LdEdvqxOYYg0tPpDob','user','ak_64a5d4e82bc6ea47','2023-05-12 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$K4/Q7de92WnmH6Do34ezHece2vCpwljLLuQ9r3PWCfQwXVanUmwKM','user','ak_5530f75050353b1e','2023-09-25 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$i8TRmZAaappRFxFJmqAr5VK/RhV2ZKaarDQTZBd0DuZ3xxEmOYevw','user','ak_1a690f32e3cd7b23','2023-04-28 10:10: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=15860;

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

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


