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

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

class OrderTodayStatTransformer
{
    public function transform($orderItem)
    {
        return [
            'distribution_channel_id' => $orderItem['distribution_channel_id'],
            'channel_name' => $orderItem['channel_name'],
            'channel_nickname' => $orderItem['channel_nickname'],
            'paid_success_num' => $orderItem['paid_success_num'],
            'amount' => (float)$orderItem['amount'],
            'pay_user_success_num' => $orderItem['pay_user_success_num'],
            'paid_num' => $orderItem['paid_num'],
            'register_user_num' => $orderItem['register_user_num'],
            'force_user_num' => $orderItem['force_user_num'],
            'send_order_create_num' => $orderItem['send_order_create_num'],
            'send_order_today_num' => $orderItem['send_order_today_num'],
            'fans_gender'=>isset($orderItem['fans_gender'])?$orderItem['fans_gender']:''
        ];
    }
}