<?php
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2017/12/7
 * Time: 下午6:07
 */

namespace App\Http\Controllers\Manage\Finance\Transformers;


use App\Modules\Channel\Services\ChannelService;

class LiquidatedStatTransformer
{
    public function transform($liquidatedStat){
        return [
            'pay_merchant_source'       =>  $liquidatedStat->pay_merchant_source,
            'pay_merchant_source_name' => ChannelService::getSourceName($liquidatedStat->pay_merchant_source),
            'amount'       =>  (float)($liquidatedStat->amount),
            'account_balance_amount'       =>  (float)($liquidatedStat->account_balance_amount),
        ];
    }


}