mein-sterntours/app/Models/TravelPlace.php
2021-11-09 18:38:44 +01:00

65 lines
2 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class TravelPlace
*
* @property int $id
* @property string $name
* @property string $description
* @property int $travel_country_id
* @property float $latitude
* @property float $longitude
* @property bool $active
* @property Carbon $created_at
* @property Carbon $updated_at
* @property TravelCountry $travel_country
* @package App\Models
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace query()
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereDescription($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereLatitude($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereLongitude($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereTravelCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|TravelPlace whereUpdatedAt($value)
* @mixin \Eloquent
*/
class TravelPlace extends Model
{
protected $connection = 'mysql_stern';
protected $table = 'travel_places';
protected $casts = [
'travel_country_id' => 'int',
'latitude' => 'float',
'longitude' => 'float',
'active' => 'bool'
];
protected $fillable = [
'name',
'description',
'travel_country_id',
'latitude',
'longitude',
'active'
];
public function travel_country()
{
return $this->belongsTo(TravelCountry::class);
}
}