<?php

namespace App\Models\Claim;

use App\Models\Institution\Institution;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Database\Eloquent\SoftDeletes;

class ClaimInstitution extends Pivot {
    use SoftDeletes;

    protected $table = 'claim_institution';

    public $fillable = [
        'claim_id',
        'institution_id',
        'dates',
    ];

    public function institution(): BelongsTo {
        return $this->belongsTo(Institution::class);
    }

    public function claim(): BelongsTo {
        return $this->belongsTo(Claim::class);
    }
}
