-- Host: db-master-0.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=16623;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$zoW4YgP3rTZkIYnn5YSTJwEJPkClSiw4pDzSV06u5J00ABDhEpGI4','user','ak_a6db803aa2086ad2','2023-04-28 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$HzFQdZi2bkUB1IF.pGuxrrmYkU0w2oGlRulfr5nsQe9ueoSmK/npC','user','ak_4ea52ab7f95b993f','2023-08-11 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$FKvdMmNq6FNXp6LVPGbh5dmps1hBazhVfPkauCiokIkbF0qdHjbnS','user','ak_67f686dc4ef5b8a1','2023-11-24 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$EBMNzg5scDC6vj/WskfGu9vRPyvgqQxvo4BerafC9/AvoYAuRfjOX','user','ak_e5c03852d0e61f7b','2023-05-02 10:08:00',NULL);

