Fewos in CRM,
Fewo Clients Bookings create / edit / delelte via API in DB
This commit is contained in:
parent
aebfb0586a
commit
c0c2a1822c
55 changed files with 9787 additions and 1486 deletions
103
app/Models/FewoLodging.php
Normal file
103
app/Models/FewoLodging.php
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<?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 $zip_code
|
||||
* @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
|
||||
*/
|
||||
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',
|
||||
'description',
|
||||
'equipment',
|
||||
'adress1',
|
||||
'adress2',
|
||||
'zip_code',
|
||||
'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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue