<?php

namespace App\Models;

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

class PetVaccinationRecord extends Model
{
    use SoftDeletes;

    protected $primaryKey = 'PVR_Id';

    protected $fillable = [
        'PVR_Sr_No',
        'PR_Id',
        'VM_Id',
        'Vaccination_Date',
        'Next_Due_Date',
        'Certificate_No',
        'Certificate_File',
        'Verification_Status',
        'Verified_By',
        'Verified_Date'
    ];

    protected $casts = [
        'Certificate_File' => 'array'
    ];

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

    public function vaccine()
    {
        return $this->belongsTo(VaccineMaster::class, 'VM_Id');
    }
}
