<?php

namespace App\Models\LeadSource;

use App\Models\Client\Client;
use App\Trait\HasSlug;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class LeadSource extends Model {

    protected $table = 'lead_sources';

    protected $fillable = [
        'slug',
        'display_name',
        'status'
    ];

    use HasSlug, SoftDeletes, HasFactory;

    public function endpoints() {
        return $this->hasMany(LeadSourceEndpoint::class);
    }

    public function leads() {
        return $this->hasMany(Client::class);
    }
}
