<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SubAccount4 extends Model
{
    use HasFactory;
    protected $table = "sub_accounts_4";
    protected $fillable = ['account_code','sub_name', 'parent_id'];

    public function subAccount3()
    {
        return $this->belongsTo(SubAccount3::class, 'parent_id');
    }

    public function subAccounts5()
    {
        return $this->hasMany(SubAccount5::class, 'parent_id');
    }
}