<?php

namespace App\Http\Controllers\Channel\Finance\Transformers;
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2017/11/17
 * Time: 下午4:26
 */

class BankTransformer
{
    public function transform($bank){
        return [
            'id'       =>  isset($bank->id) ? $bank->id : 0,
            'name'       =>  isset($bank->name) ? $bank->name : "",
            'code'   =>  isset($bank->code) ? $bank->code : "",
            'source'   =>  isset($bank->source) ? $bank->source : "",
        ];
    }
}