feat: update models and relationships

This commit is contained in:
2026-08-17 09:59:20 +03:30
parent f726c41ba0
commit f137797e3b
3 changed files with 47 additions and 9 deletions
+11 -6
View File
@@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class City
*
*
* @property int $id
* @property int $county_id
* @property int $province_id
@@ -22,7 +22,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property Carbon $created_at
* @property Carbon $updated_at
* @property string|null $deleted_at
*
*
* @property Country $country
* @property Province $province
* @property Collection|Airport[] $airports
@@ -65,10 +65,15 @@ class City extends Model
return $this->hasMany(Airport::class);
}
public function tours()
{
return $this->hasMany(Tour::class, 'destination_city_id');
}
public function destinationTours()
{
return $this->hasMany(Tour::class, 'destination_city_id');
}
public function originTours()
{
return $this->hasMany(Tour::class, 'origin_city_id');
}
public function users()
{