feat: add feedback api
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* App-level feedback (نظرات و ایدهها): one editable entry per user holding an
|
||||
* overall star rating and/or an idea/comment about the application.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('app_feedback', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained('users')->cascadeOnDelete();
|
||||
$table->unsignedTinyInteger('stars')->nullable(); // 1-5 overall rating
|
||||
$table->text('content')->nullable(); // idea / comment
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique('user_id'); // one feedback row per user (edited in place)
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('app_feedback');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user