<?php

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

class SuperiorHistoryBookTransformer
{
    public function transform($item)
    {
        return [
            'id'=>$item->id,
            'bid'=>$item->bid,
            'book_name'=>$item->book_name,
            'gender'=>($item->pid==1)?'男':'女',
            'register_uv_rate'=>$item->register_uv_rate,
            'pay_uv_rate'=>$item->pay_uv_rate,
            'charge_uv_rate'=>$item->charge_uv_rate,
            'add_time'=>$item->created_at->format('Y-m-d H:i:s'),
            'sequence'=>$item->order_index
        ];
    }
}