<?php

namespace App\Models\Claim;

use App\Models\Institution\Institution;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class CareSetting extends Model {
    public $fillable = [
        'claim_id',
        'institution_id',
        'dates',
        'people_involved',
        'statement'
    ];

    use SoftDeletes;

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

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

    public function statementHistory() {
        return $this->hasMany(CareSettingStatementHistory::class)->latest();
    }
}
