<?php

namespace App\Models;

use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Tenant extends Model
{
    use HasFactory;

    protected $fillable = ['name', 'api_key'];

    // Um Cliente tem muitas Filas
    public function queues()
    {
        return $this->hasMany(Queue::class);
    }

    // Um Cliente tem muitos Agentes
    public function agents()
    {
        return $this->hasMany(Agent::class);
    }

    public function users()
    {
        return $this->hasMany(User::class);
    }
}
