feat:implement comments controllers and form request and add comment model

This commit is contained in:
2026-08-17 13:05:39 +03:30
parent 0763752e00
commit effa596cd0
3 changed files with 108 additions and 5 deletions
+7 -5
View File
@@ -6,12 +6,13 @@
namespace App\Models;
use App\Enums\CommentStatus;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Comment
*
*
* @property int $id
* @property int $user_id
* @property int|null $flight_id
@@ -21,7 +22,7 @@ use Illuminate\Database\Eloquent\Model;
* @property int $status
* @property Carbon $created_at
* @property Carbon|null $updated_at
*
*
* @property Flight|null $flight
* @property Tour|null $tour
* @property User $user
@@ -38,7 +39,7 @@ class Comment extends Model
'flight_id' => 'int',
'tour_id' => 'int',
'rating' => 'int',
'status' => 'int'
'status' => CommentStatus::class,
];
protected $fillable = [
@@ -46,8 +47,9 @@ class Comment extends Model
'flight_id',
'tour_id',
'comment',
'rating',
'status'
'status',
'guest_name',
'guest_email',
];
public function flight()