<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Conversation extends Model
{
    use HasFactory,SoftDeletes;
    protected $table = "conversations";
    protected $fillable = [
        'phone',
        'thread',
        'ia_status',
        'isCustomer',
        'entity_status',
        'last_message',
    ];
    protected $hidden = [
        'updated_at',
        'deleted_at',
        'created_by',
        'updated_by',
        'deleted_by',
    ];
    public function customer(){
        return $this->hasOne(Customer::class);
    }
}
