diff --git a/app/Models/StaffActionLog.php b/app/Models/StaffActionLog.php new file mode 100644 index 0000000..5f7a349 --- /dev/null +++ b/app/Models/StaffActionLog.php @@ -0,0 +1,15 @@ +id(); + $table->unsignedBigInteger('user_id'); // ID of the user who is performing the action + $table->unsignedBigInteger('target_id'); // ID of the user being acted upon + $table->string('action'); // e.g., 'ban', 'remove_avatar' + $table->string('message')->nullable(); // e.g., 'removed avatar 456845967.png for user username (ID: 398)' + $table->timestamps(); + + $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); + $table->foreign('target_id')->references('id')->on('users')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('staff_action_log'); + } +};