<?php

namespace App\Http\Controllers\Channel\Order\Transformers;
use Hashids;
class BookOrderTransformer
{
    public function transform($res){
        return [
            'id'          =>  $res->id,
            'type'          =>  '消耗',
            'detail'        => '单本订购',
            'book_name'    =>  $res->book_name,
            'chapter_name'    =>  '',
            'fee'            =>  (int)$res->fee,
            'created_at'      => date("Y-m-d H:i:s",strtotime($res->created_at)),

        ];
    }
}