<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2017/11/22
 * Time: 14:17
 */

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

class SendOrderBookDayStatTransformer
{
    public function transform($item)
    {
        return [
            'bid'=>(string)$item->bid,
            'book_name' => (string)$item->book_name,
            'gender'=>$item->pid==1?'男频':'女频',
            'send_order_num' => (int)$item->send_order_num,
            'recharge_amount' => (float)$item->sum_recharge_amount,
            'register_user_num' => (float)$item->sum_register_user_num,
            'uv' => (int)$item->sum_uv,
            'pv' => (int)$item->sum_pv,
            'paid_num' => (int)$item->sum_paid_num,
            'unpaid_num' => (int)$item->sum_unpaid_num,
        ];
    }
}