Edit / PDF / Mail / ->Leads
This commit is contained in:
parent
5d55e5be3f
commit
66ca252bfa
43 changed files with 2915 additions and 76 deletions
114
app/Models/LeadMail.php
Normal file
114
app/Models/LeadMail.php
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class LeadMail
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $lead_id
|
||||
* @property int $customer_id
|
||||
* @property bool $is_answer
|
||||
* @property int $reply_id
|
||||
* @property string $email
|
||||
* @property string $recipient
|
||||
* @property string $cc
|
||||
* @property string $bcc
|
||||
* @property string $subject
|
||||
* @property string $message
|
||||
* @property int $dir
|
||||
* @property int $subdir
|
||||
* @property bool $draft
|
||||
* @property bool $important
|
||||
* @property bool $send
|
||||
* @property bool $fail
|
||||
* @property string $error
|
||||
* @property string $forward
|
||||
* @property Carbon $sent_at
|
||||
* @property Carbon $scheduled_at
|
||||
* @property Carbon $delivered_at
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property Customer $customer
|
||||
* @property Lead $lead
|
||||
* @property CustomerMail $customer_mail
|
||||
* @property Collection|LeadFile[] $lead_files
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class LeadMail extends Model
|
||||
{
|
||||
protected $table = 'lead_mails';
|
||||
|
||||
protected $casts = [
|
||||
'lead_id' => 'int',
|
||||
'customer_id' => 'int',
|
||||
'is_answer' => 'bool',
|
||||
'reply_id' => 'int',
|
||||
'dir' => 'int',
|
||||
'subdir' => 'int',
|
||||
'draft' => 'bool',
|
||||
'important' => 'bool',
|
||||
'send' => 'bool',
|
||||
'fail' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'sent_at',
|
||||
'scheduled_at',
|
||||
'delivered_at'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'lead_id',
|
||||
'customer_id',
|
||||
'is_answer',
|
||||
'reply_id',
|
||||
'email',
|
||||
'recipient',
|
||||
'cc',
|
||||
'bcc',
|
||||
'subject',
|
||||
'message',
|
||||
'dir',
|
||||
'subdir',
|
||||
'draft',
|
||||
'important',
|
||||
'send',
|
||||
'fail',
|
||||
'error',
|
||||
'forward',
|
||||
'sent_at',
|
||||
'scheduled_at',
|
||||
'delivered_at'
|
||||
];
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo(Lead::class);
|
||||
}
|
||||
|
||||
public function customer_mail()
|
||||
{
|
||||
return $this->belongsTo(CustomerMail::class, 'reply_id');
|
||||
}
|
||||
|
||||
public function lead_files()
|
||||
{
|
||||
return $this->hasMany(LeadFile::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue