<?php

namespace App\Models\Dsar;

use App\Models\Claim\Claim;
use App\Trait\BelongsToSolicitor;
use App\Trait\HasSlug;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class DsarTranche extends Model
{
    public $fillable = [
        'solicitor_id',
        'claim_id',
        'status'
    ];

    use BelongsToSolicitor, HasSlug, SoftDeletes;

    public function dsars() {
        return $this->hasMany(Dsar::class, 'tranche_id');
    }

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