<?php

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

class BookGiftTransformer
{
    public function transform($item)
    {
        return [
            'bid' => isset($item->bid)?$item->bid:'',
            'book_name' => isset($item->book_name)?$item->book_name:'',
            'gift_id'=>isset($item->gift_id)?$item->gift_id:'',
            'gift_name'=>isset($item->gift_name)?$item->gift_name:'',
            'gift_send_times'=>$item->send_times,
            'gift_send_user_num'=>$item->send_user_num,
            'gift_send_cost'=>$item->cost_sum,
        ];
    }
}