75 lines
2.4 KiB
PHP
75 lines
2.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class TravelCompanyService
|
|
*
|
|
* @property int $id
|
|
* @property int $travel_company_id
|
|
* @property string $name
|
|
* @property string $description
|
|
* @property bool $active
|
|
* @property int $pos
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
* @property TravelCompany $travel_company
|
|
* @property Collection|BookingCompanyService[] $booking_company_services
|
|
* @package App\Models
|
|
* @property-read int|null $booking_company_services_count
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService whereActive($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService whereDescription($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService wherePos($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService whereTravelCompanyId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompanyService whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class TravelCompanyService extends Model
|
|
{
|
|
protected $connection = 'mysql';
|
|
|
|
protected $table = 'travel_company_services';
|
|
|
|
protected $casts = [
|
|
'travel_company_id' => 'int',
|
|
'active' => 'bool',
|
|
'pos' => 'int'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'travel_company_id',
|
|
'name',
|
|
'description',
|
|
'active',
|
|
'pos'
|
|
];
|
|
|
|
protected $status_type = [
|
|
0 => 'offen',
|
|
1 => 'erledigt',
|
|
];
|
|
|
|
public function travel_company()
|
|
{
|
|
return $this->belongsTo(TravelCompany::class);
|
|
}
|
|
|
|
public function booking_company_services()
|
|
{
|
|
return $this->hasMany(BookingCompanyService::class);
|
|
}
|
|
}
|