<?php
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2018/3/23
 * Time: 上午9:18
 */

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


class CompanyTransformer
{
    public function transform($obj)
    {
        return [
            'id' => $obj->id,
            'name' => $obj->name,
            'city'=>$obj->city,
            'is_important' => (int)$obj->is_important,
            'distribution_manages_id' => $obj->distribution_manages_id,
            'distribution_manages_nickname'=>$obj->distribution_manages_nickname,
            'create_time'   =>  isset($obj->created_at) ? date("Y-m-d H:i:s",strtotime($obj->created_at)) : "",
            'fans_gender'   =>  isset($obj->fans_gender) ? $obj->fans_gender:''
        ];
    }
}