mein-sterntours/app/Models/FewoLodging.php
2020-06-29 12:23:21 +02:00

133 lines
4.7 KiB
PHP

<?php
/**
* Created by Reliese Model.
* Date: Thu, 21 Mar 2019 13:40:05 +0100.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Reliese\Database\Eloquent\Model as Eloquent;
/**
* Class FewoLodging
*
* @property int $id
* @property int $group_id
* @property int $type_id
* @property string $name
* @property string $description
* @property string $equipment
* @property string $adress1
* @property string $adress2
* @property string $zipcode
* @property string $city
* @property int $maximum_persons
* @property float $deposit
* @property bool $calendar_visible
* @property \App\Models\FewoLodgingType $fewo_lodging_type
* @property \App\Models\FewoLodgingGroup $fewo_lodging_group
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodging_images
* @property \Illuminate\Database\Eloquent\Collection $fewo_prices
* @property \Illuminate\Database\Eloquent\Collection $fewo_reservations
* @property \Illuminate\Database\Eloquent\Collection $pages
* @property \Illuminate\Database\Eloquent\Collection $travel_user_booking_fewos
* @package App\Models
* @mixin \Eloquent
* @property string|null $single_name
* @property string $zip_code
* @property int|null $maximum_adults
* @property int|null $maximum_childs
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereAdress1($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereAdress2($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereCalendarVisible($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereDeposit($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereDescription($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereEquipment($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereGroupId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereMaximumAdults($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereMaximumChilds($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereMaximumPersons($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereSingleName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereTypeId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereZipCode($value)
* @property-read int|null $fewo_lodging_images_count
* @property-read int|null $fewo_prices_count
* @property-read int|null $fewo_reservations_count
* @property-read int|null $pages_count
* @property-read int|null $travel_user_booking_fewos_count
*/
class FewoLodging extends Model
{
protected $connection = 'mysql_stern';
protected $table = 'fewo_lodging';
public $timestamps = false;
protected $casts = [
'group_id' => 'int',
'type_id' => 'int',
'maximum_persons' => 'int',
'deposit' => 'float',
'calendar_visible' => 'bool'
];
protected $fillable = [
'group_id',
'type_id',
'name',
'single_name',
'pdf_name',
'description',
'equipment',
'adress1',
'adress2',
'zipcode',
'city',
'maximum_persons',
'deposit',
'calendar_visible'
];
public function fewo_lodging_type()
{
return $this->belongsTo(\App\Models\FewoLodgingType::class, 'type_id');
}
public function fewo_lodging_group()
{
return $this->belongsTo(\App\Models\FewoLodgingGroup::class, 'group_id');
}
public function fewo_lodging_images()
{
return $this->hasMany(\App\Models\FewoLodgingImage::class, 'lodging_id');
}
public function fewo_prices()
{
return $this->hasMany(\App\Models\FewoPrice::class, 'lodging_id');
}
public function fewo_reservations()
{
return $this->hasMany(\App\Models\FewoReservation::class, 'lodging_id');
}
public function pages()
{
return $this->hasMany(\App\Models\Page::class, 'fewo_lodging');
}
public function travel_user_booking_fewos()
{
return $this->hasMany(\App\Models\TravelUserBookingFewo::class);
}
}