mein-sterntours/app/Models/TravelCountryService.php
2020-05-28 19:03:42 +02:00

85 lines
2.8 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class TravelCountryService
*
* @property int $id
* @property int $travel_country_id
* @property int $crm_travel_country
* @property string $name
* @property string $description
* @property bool $active
* @property Carbon $created_at
* @property Carbon $updated_at
* @property TravelCountry $travel_country
* @property Collection|BookingCountryService[] $booking_country_services
* @package App\Models
* @property int|null $crm_travel_country_id
* @property int|null $pos
* @property-read int|null $booking_country_services_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereCrmTravelCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereDescription($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService wherePos($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereTravelCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereUpdatedAt($value)
* @mixin \Eloquent
*/
class TravelCountryService extends Model
{
protected $connection = 'mysql';
protected $table = 'travel_country_services';
protected $casts = [
'travel_country_id' => 'int',
'crm_travel_country_id' => 'int',
'pos' => 'int',
'active' => 'bool'
];
protected $fillable = [
'travel_country_id',
'crm_travel_country_id',
'name',
'description',
'pos',
'active'
];
protected $status_type = [
0 => 'offen',
1 => 'erledigt',
];
public function travel_country()
{
return $this->belongsTo(TravelCountry::class, 'travel_country_id');
}
public function crm_travel_country()
{
return $this->belongsTo(\App\Models\Sym\TravelCountry::class);
}
public function booking_country_services()
{
return $this->hasMany(BookingCountryService::class);
}
}