<?php

namespace App\Models;

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

class CaseObject extends Model
{
    use HasFactory;
    use SoftDeletes;

    protected $table = 'objects';

    protected $fillable = [
        'reference',
        'name',
        'description',
        'type',
        'contract_id',
    ];

    public function contract(): BelongsTo
    {
        return $this->belongsTo(Contract::class, 'contract_id');
    }
}
