<?php


namespace App\Modules\Push\Services;


use App\Modules\Push\Models\QappPushApp;
use App\Modules\Push\Models\QappPushUser;

class PushAppService
{
    /**
     * 获取apps
     * @param $provider
     * @return array
     */
    public static function getAppsByProvider($provider): array
    {
        if (empty($provider)) {
            return [];
        }

        return QappPushApp::getPushAppsByProvider($provider);
    }

    public static function getAppUsersByProvider($provider, $id = 0)
    {
        if (empty($provider)) {
            return [];
        }

        return QappPushUser::getPushUsersByProvider($provider, $id);
    }
}