<?php

namespace Modules\VetClinic\Entities;

use Illuminate\Database\Eloquent\Model;

class VcPetCondition extends Model
{
    protected $table = 'vc_pet_conditions';
    protected $guarded = ['id'];

    protected $casts = [
        'diagnosed_date' => 'date',
    ];

    public function pet()
    {
        return $this->belongsTo(VcPet::class, 'pet_id');
    }

    public function condition()
    {
        return $this->belongsTo(VcMedicalCondition::class, 'condition_id');
    }

    public function doctor()
    {
        return $this->belongsTo(VcDoctor::class, 'diagnosed_by');
    }
}
