mein-sterntours/app/Models/TravelAgenda.php
2025-04-01 10:40:14 +02:00

53 lines
No EOL
1.6 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\TravelAgenda
*
* @property int $id
* @property string $name
* @property int|null $travelcountry_id
* @property int|null $active
* @property-read \App\Models\TravelCountry|null $travel_country
* @property-read \App\Models\Sym\TravelCountry|null $travel_country_crm
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereTravelcountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda query()
* @mixin \Eloquent
*/
class TravelAgenda extends Model
{
protected $connection = 'mysql';
protected $table = 'travel_agenda';
protected $fillable = [
'name',
'travelcountry_id',
'active'
];
public $timestamps = false;
//on crm
public function travel_country_crm()
{
return $this->belongsTo('App\Models\Sym\TravelCountry', 'travelcountry_id', 'id');
}
//on stern other DB
public function travel_country()
{
return $this->belongsTo('App\Models\TravelCountry', 'travelcountry_id', 'crm_id');
}
}