<?php

namespace App\Http\Controllers\WapAlipay\User\Transformers;
use Hashids;
class ReadRecordTransformer
{
    public function transform($res)
    {
        return [
            'bid' => Hashids::encode($res->bid),
            'cid' => $res->cid,
            'book_name' => $res->book_name,
            'chapter_name' => $res->chapter_name,
            'time' => $res->time,
            'cover' => $res->cover,
            'last_chapter' => $res->last_chapter,
            'is_on_user_shelf'=>$res->is_on_user_shelf
        ];
    }
}