01 2020
This commit is contained in:
parent
bed91c4f4a
commit
c8948338bb
122 changed files with 7911 additions and 1639 deletions
55
app/Models/InquiryType.php
Normal file
55
app/Models/InquiryType.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class InquiryType
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $arrangement_type_id
|
||||
* @property ArrangementType $arrangement_type
|
||||
* @property Collection|Inquiry[] $inquiries
|
||||
* @package App\Models
|
||||
* @property-read int|null $inquiries_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType whereArrangementTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class InquiryType extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'inquiry_type';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'arrangement_type_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'arrangement_type_id'
|
||||
];
|
||||
|
||||
public function arrangement_type()
|
||||
{
|
||||
return $this->belongsTo(ArrangementType::class);
|
||||
}
|
||||
|
||||
public function inquiries()
|
||||
{
|
||||
return $this->hasMany(Inquiry::class, 'type_id');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue