<?php

namespace App\Http\Controllers\QuickApp\User\Transformers;

use Hashids;

class ReadRecordTransformer
{
    public function transform($res)
    {
        return [
            'book_id'      => Hashids::encode($res->bid),
            'cid'          => $res->cid,
            'book_name'    => $res->book_name,
            'chapter_name' => $res->chapter_name,
            'time'         => $res->time,
            'cover_url'    => $res->cover,
            'cover'        => $res->cover,
            'last_chapter' => $res->last_chapter,
            'intro' => $res->intro,
            'author' => $res->author,
            'size' => $res->size,
            'status' => $res->status,
        ];
    }
}
