<?php

namespace App\Policies;

use App\Models\SystemSetting;
use App\Models\User;

class SystemSettingPolicy
{
    /**
     * 查看系统设置列表
     */
    public function viewAny(User $user): bool
    {
        return $user->can('system-setting.view');
    }

    /**
     * 查看系统设置详情
     */
    public function view(User $user, SystemSetting $systemSetting): bool
    {
        return $user->can('system-setting.view');
    }

    /**
     * 更新系统设置
     */
    public function update(User $user, SystemSetting $systemSetting): bool
    {
        return $user->can('system-setting.update');
    }
}
