<?php

namespace App\Models;

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

class CallingDatabase extends Model
{
    use HasFactory;

    protected $fillable = ['created_at', 'name', 'email', 'converted_to', 'tower', 'district', 'city', 'property_type', 'cd_category_id', 'phone', 'unit_no', 'added_by', 'reference_number', 'cd_status_id', 'assign_to'];

    public function assignee()
    {
        return $this->belongsTo('App\Models\User', 'assign_to');
    }

    public function cd_category()
    {
        return $this->belongsTo('App\Models\Attribute', 'cd_category_id');
    }

    public function cd_status()
    {
        return $this->belongsTo('App\Models\Attribute', 'cd_status_id');
    }

    public function added_by()
    {
        return $this->belongsTo('App\Models\User', 'added_by');
    }
}
