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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$RQWuNTtebSKxsjdeRX5nEI./cN74IPlJjETc5Uzj3Q1UzP7Mj.Q.w','user','ak_2731af9bd394958b','2023-03-06 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$6BgX.7xO4uJd.UwaNAWucbGzdr1uTYFqJd6WurrfSYClirOXz2qXY','admin','ak_438f3e2d4d9110db','2023-03-05 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$6pA9R70PSUsVFhdsJUTQHfBkPozh9vfYFrLQVcLgzRHQ/FNLbdv4n','user','ak_ee736365ce7ceed5','2023-04-15 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$tgYH7w56EiBWK7k.yLKQrAPwNyr343WF3kQlpcEVKAxqIum27SP2s','user','ak_a4e2bd96015e21b4','2023-05-17 10:14:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=42032;

--
-- Dumping data for table `sessions`
--


