fix: regenerate models and add database

This commit is contained in:
2026-08-16 08:06:57 +03:30
parent 8fa8d82c29
commit ff69c76dc4
11 changed files with 264 additions and 59 deletions
+22 -1
View File
@@ -14,10 +14,16 @@ use Illuminate\Database\Eloquent\Model;
*
* @property int $id
* @property int $user_id
* @property int|null $flight_id
* @property int|null $tour_id
* @property string $comment
* @property int|null $rating
* @property int $status
* @property Carbon $created_at
* @property Carbon|null $updated_at
*
* @property Flight|null $flight
* @property Tour|null $tour
* @property User $user
*
* @package App\Models
@@ -25,20 +31,35 @@ use Illuminate\Database\Eloquent\Model;
class Comment extends Model
{
protected $table = 'comments';
public $timestamps = false;
public static $snakeAttributes = false;
protected $casts = [
'user_id' => 'int',
'flight_id' => 'int',
'tour_id' => 'int',
'rating' => 'int',
'status' => 'int'
];
protected $fillable = [
'user_id',
'flight_id',
'tour_id',
'comment',
'rating',
'status'
];
public function flight()
{
return $this->belongsTo(Flight::class);
}
public function tour()
{
return $this->belongsTo(Tour::class);
}
public function user()
{
return $this->belongsTo(User::class);