Files
hatame.andarza09/app/Models/Comment.php
T
hatame 687681744a git add .
git commit "Implement user registration"
2026-08-16 08:52:04 +03:30

59 lines
917 B
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Comment
*
* @property int $id
* @property int $user_id
* @property int $tour_id
* @property int $rating
* @property string|null $comment
* @property int $status
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Tour $tour
* @property User $user
*
* @package App\Models
*/
class Comment extends Model
{
protected $table = 'comments';
public static $snakeAttributes = false;
protected $casts = [
'user_id' => 'int',
'tour_id' => 'int',
'rating' => 'int',
'status' => 'int'
];
protected $fillable = [
'user_id',
'tour_id',
'rating',
'comment',
'status'
];
public function tour()
{
return $this->belongsTo(Tour::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}