mein-sterntours/app/Models/Arrangement.php
2020-04-15 12:11:42 +02:00

88 lines
2.6 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Arrangement
*
* @property int $id
* @property int $template_id
* @property Carbon $state
* @property Carbon $begin
* @property Carbon $end
* @property string $type_s
* @property string $data_s
* @property int $view_position
* @property int $booking_id
* @property int $type_id
* @property bool $in_pdf
* @property Booking $booking
* @property ArrangementTemplate $arrangement_template
* @package App\Models
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereBegin($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereBookingId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereDataS($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereEnd($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereInPdf($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereState($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereTemplateId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereTypeId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereTypeS($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereViewPosition($value)
* @mixin \Eloquent
*/
class Arrangement extends Model
{
protected $connection = 'mysql';
protected $table = 'arrangement';
public $timestamps = false;
protected $casts = [
'template_id' => 'int',
'view_position' => 'int',
'booking_id' => 'int',
'type_id' => 'int',
'in_pdf' => 'bool'
];
protected $dates = [
'state',
'begin',
'end'
];
protected $fillable = [
'template_id',
'state',
'begin',
'end',
'type_s',
'data_s',
'view_position',
'booking_id',
'type_id',
'in_pdf'
];
public function booking()
{
return $this->belongsTo(Booking::class);
}
public function arrangement_template()
{
return $this->belongsTo(ArrangementTemplate::class, 'template_id');
}
}