'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); } }