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

namespace App\Http\Controllers\Channel\Welfare\Transformer;

class WelfarePromotionBookTransform
{
    public function transform($item)
    {
        return [
            'id' => $item->id,
            'bid' => $item->bid,
            'book_name' => $item->book_name,
            'charge_rate' => $item->charge_rate,
            'data_img' => $item->data_img,
            'is_important' => $item->is_important,
            'channer_user_id' => $item->channer_user_id,
            'force_subscribe_rate' => $item->force_subscribe_rate,
            'updated_at' => date("Y-m-d H:i:s", strtotime($item->updated_at)),
            'created_at' => date("Y-m-d H:i:s", strtotime($item->created_at)),
        ];
    }
}