-- Host: db-master-2.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=36875;

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$fWchDsPy8sDKszIh118ExGteA2bfJFoGDCw/1c.V7r/SpGRg7gFoX','admin','ak_d1c0691dd62bbd03','2023-09-04 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$WyxQKY1XBzdVoRLE1PRshrPsHb0SZ.RlU9oFAgHdZ2frCZ7BUzZSF','user','ak_b9aa1db5b43547c5','2023-12-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$VYUtbA91eZnU2kh./vYD/3lbTkgCb5CdAUqmaK22RLFRt/QFkB245','user','ak_b97e51e6f7951672','2023-10-14 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$h/u4HrUz/PMsirbZ7KBUckrnPPB23VGbdV5zNI53Z0fd80gRI/6Zl','user','ak_98978ed2c6ea8da2','2023-02-24 10:03:00',NULL);

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

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


