<?php

namespace App\Models;

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

class ChatGroup extends Model
{
    use HasFactory;
    protected $table = 'chat_group';

    protected $fillable = ['company_id', 'user_id', 'customer_id', 'name', 'email', 'subject', 'status'];

    public function messages()
    {
        return $this->hasMany(Message::class, 'chat_id');
    }
}
