49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
* Date: Thu, 21 Mar 2019 13:40:07 +0100.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class FewoLodgingGroup
|
|
*
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodgings
|
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodging_group_images
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup whereName($value)
|
|
* @property-read int|null $fewo_lodging_group_images_count
|
|
* @property-read int|null $fewo_lodgings_count
|
|
* @mixin \Eloquent
|
|
*/
|
|
class FewoLodgingGroup extends Model
|
|
{
|
|
protected $connection = 'mysql_stern';
|
|
|
|
protected $table = 'fewo_lodging_group';
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'name'
|
|
];
|
|
|
|
public function fewo_lodgings()
|
|
{
|
|
return $this->hasMany(\App\Models\FewoLodging::class, 'group_id');
|
|
}
|
|
|
|
public function fewo_lodging_group_images()
|
|
{
|
|
return $this->hasMany(\App\Models\FewoLodgingGroupImage::class, 'group_id');
|
|
}
|
|
}
|