<?php
declare (strict_types = 1);

namespace app\index\model;

use app\common\model\SysNavigationBaseModel;
use think\model\concern\SoftDelete;

/**
 * 导航模型
 * @mixin \think\Model
 */
class SysNavigationModel extends SysNavigationBaseModel
{
    // 启用软删除
    use SoftDelete;
    // 软删除字段
    protected $deleteTime = 'deleted_at';

    // 根据unique_label获取
    public function scopeUniqueLabel($query, string $unique_label)
    {
        $query->where('unique_label', '=', $unique_label);
    }
}
