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
+59
View File
@@ -0,0 +1,59 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Favorite
*
* @property int $id
* @property int $user_id
* @property int|null $flight_id
* @property int|null $tour_id
* @property Carbon|null $created_at
*
* @property Flight|null $flight
* @property Tour|null $tour
* @property User $user
*
* @package App\Models
*/
class Favorite extends Model
{
protected $table = 'favorites';
public $timestamps = false;
public static $snakeAttributes = false;
protected $casts = [
'user_id' => 'int',
'flight_id' => 'int',
'tour_id' => 'int'
];
protected $fillable = [
'user_id',
'flight_id',
'tour_id'
];
public function flight()
{
return $this->belongsTo(Flight::class);
}
public function tour()
{
return $this->belongsTo(Tour::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}