<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2017/12/1
 * Time: 11:42
 */

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

class OrderStatTransformer
{
    public function transform($stat)
    {
        return [
            'distribution_channel_id' => $stat->distribution_channel_id,
            'distribution_channel_name' => $stat->nickname,
            'pay_success_user_num' => $stat->pay_success_user_num,
            'unpaid_num' => $stat->unpaid_num,
            'paid_num' => $stat->paid_num,
            'total_recharge_amount' => $stat->total_recharge_amount,
            'promotion_total_uv'=>$stat->promotion_total_uv,
            'promotion_total_pv'=>$stat->promotion_total_pv,
            'send_order_num' => $stat->send_order_num,
            'register_user_num' => $stat->register_user_num,
            'ticket_recharge_pay_user_num' => $stat->ticket_recharge_pay_user_num,
            'year_pay_user_num' => $stat->year_pay_user_num,
            'force_user_num' => $stat->force_user_num,
            'phone' => $stat->phone,
            'official_account_num'=>$stat->official_account_num,
            'official_account_names'=>(string)$stat->official_account_names
        ];
    }
}