feat: add bylaw management features including documents, legal authorities, subject categories, and nodes

This commit is contained in:
2026-06-26 13:49:50 +03:30
parent 2e26bd229b
commit 9cf6957675
113 changed files with 1112 additions and 358 deletions

27
app/Models/BylawNode.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BylawNode extends Model
{
protected $table = 'bylaw_nodes';
protected $fillable = ['document_id', 'parent_id', 'node_type_id', 'node_identifier', 'title', 'node_content', 'sort_order', 'valid_from', 'valid_to', 'node_status'];
public function document()
{
return $this->belongsTo(BylawDocument::class, 'document_id');
}
public function parent()
{
return $this->belongsTo(self::class, 'parent_id');
}
public function type()
{
return $this->belongsTo(BylawNodeType::class, 'node_type_id');
}
}