90 lines
2.5 KiB
PHP
90 lines
2.5 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class Inquiry
|
|
*
|
|
* @property int $id
|
|
* @property int $lead_id
|
|
* @property int $template_id
|
|
* @property bool $in_pdf
|
|
* @property Carbon $begin
|
|
* @property Carbon $end
|
|
* @property int $type_id
|
|
* @property string $type_s
|
|
* @property string $data_s
|
|
* @property int $view_position
|
|
* @property Lead $lead
|
|
* @property InquiryTemplate $inquiry_template
|
|
* @property InquiryType $inquiry_type
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereBegin($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereDataS($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereEnd($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereInPdf($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereLeadId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTemplateId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTypeId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTypeS($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereViewPosition($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Inquiry extends Model
|
|
{
|
|
protected $connection = 'mysql';
|
|
|
|
protected $table = 'inquiry';
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'lead_id' => 'int',
|
|
'template_id' => 'int',
|
|
'in_pdf' => 'bool',
|
|
'type_id' => 'int',
|
|
'view_position' => 'int'
|
|
];
|
|
|
|
protected $dates = [
|
|
'begin',
|
|
'end'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'lead_id',
|
|
'template_id',
|
|
'in_pdf',
|
|
'begin',
|
|
'end',
|
|
'type_id',
|
|
'type_s',
|
|
'data_s',
|
|
'view_position'
|
|
];
|
|
|
|
public function lead()
|
|
{
|
|
return $this->belongsTo(Lead::class);
|
|
}
|
|
|
|
public function inquiry_template()
|
|
{
|
|
return $this->belongsTo(InquiryTemplate::class, 'template_id');
|
|
}
|
|
|
|
public function inquiry_type()
|
|
{
|
|
return $this->belongsTo(InquiryType::class, 'type_id');
|
|
}
|
|
}
|