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

92 lines
2.6 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class ArrangementType
*
* @property int $id
* @property string $name
* @property int $notify_rel_days
* @property int $arrangement_type_id
* @property bool $is_unique
* @property int $notify_rel_field_key
* @property ArrangementType $arrangement_type
* @property Booking $booking
* @property DraftItem $draft_item
* @property DraftType $draft_type
* @property Collection|ArrangementType[] $arrangement_types
* @property Collection|InquiryType[] $inquiry_types
* @package App\Models
* @property-read int|null $arrangement_types_count
* @property-read int|null $inquiry_types_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereArrangementTypeId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereIsUnique($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereNotifyRelDays($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereNotifyRelFieldKey($value)
* @mixin \Eloquent
*/
class ArrangementType extends Model
{
protected $connection = 'mysql';
protected $table = 'arrangement_type';
public $timestamps = false;
protected $casts = [
'notify_rel_days' => 'int',
'arrangement_type_id' => 'int',
'is_unique' => 'bool',
'notify_rel_field_key' => 'int'
];
protected $fillable = [
'name',
'notify_rel_days',
'arrangement_type_id',
'is_unique',
'notify_rel_field_key'
];
public function arrangement_type()
{
return $this->belongsTo(ArrangementType::class);
}
public function booking()
{
return $this->belongsTo(Booking::class);
}
public function draft_item()
{
return $this->belongsTo(DraftItem::class);
}
public function draft_type()
{
return $this->belongsTo(DraftType::class);
}
public function arrangement_types()
{
return $this->hasMany(ArrangementType::class);
}
public function inquiry_types()
{
return $this->hasMany(InquiryType::class);
}
}