<?php

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

class ChannelTransformer
{
    public function transform($channel)
    {
        return [
            'id' => $channel->id,
            'nickname' =>empty($channel->site_nick_name)? '站点'.$channel->id:$channel->site_nick_name,
            'paySubstituteSwitch'=>isset($channel->paySubstituteSwitch)?$channel->paySubstituteSwitch:1
        ];
    }
}