<?php

namespace App\Models\Pay;


use Illuminate\Database\Eloquent\Model;

class PayMerchant extends Model
{
    protected $table = 'pay_merchants';

    protected $fillable = ['name', 'description', 'is_enabled', 'appid', 'official_account','source'];


    /**
     * 根据ID查找
     * @param $id
     * @return mixed
     */
    public static function getPayMerchantSingle($id) {
        return self::find($id);
    }

    /**
     * 查找所有的支付渠道通道
     * @return mixed
     */
    public static function getPayMerchantSourceList() {
        $result = self::select('source')->distinct();
        return $result;
    }
}