<?php
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2018/6/20
 * Time: 下午5:05
 */

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


class OfficialAccountDaySubStatTransformer
{

    public function transform($obj){
        return [
            'appid'       =>  isset($obj->appid) ? $obj->appid : "",
            'official_account_name'       =>  isset($obj->official_account_name) ? $obj->official_account_name : "",
            'month'       =>  isset($obj->month) ? $obj->month : "",
            'date'       =>  isset($obj->date) ? $obj->date : "",
            'reward_balance'       =>  (int)isset($obj->reward_balance) ? $obj->reward_balance : 0,
            'charge_balance'       =>  (int)isset($obj->charge_balance) ? $obj->charge_balance : 0,
            'fee'       =>  (int)isset($obj->fee) ? $obj->fee : 0,
        ];
    }

}