<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Dcat\Admin\Traits\ModelTree;
use Illuminate\Database\Eloquent\Model;

class SiteAlbumFolder extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'site_album_folder';

    use HasDateTimeFormatter,
        ModelTree {
        ModelTree::boot as treeBoot;
    }

    public function allNodes()
    {
        return $this->callQueryCallbacks(new static())
            ->orderBy($this->getOrderColumn(), 'desc')
            ->get();
    }

}
