<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class DocumentLink extends Model
{
    protected $table = 'document_links';

    protected $fillable = [
        'source_id',
        'source_type',
        'target_id',
        'target_type',
        'link_type',
        'status',
        'created_by',
    ];

    public function lineLinks(): HasMany
    {
        return $this->hasMany(DocumentLineLink::class, 'document_link_id');
    }
}

