<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class WhatsAppMessage extends Model 
{ 

protected $table = 'whatsapp_messages';    
protected $fillable=['lead_id','user_id','to_phone','direction','type','status','provider_message_id','body','payload','error_message']; protected $casts=['payload'=>'array']; public function lead(){return $this->belongsTo(Lead::class);} public function user(){return $this->belongsTo(User::class);} }
