<?php


namespace App\Http\Transformers;


use App\Model\RedisModel;
use App\Model\SupplierApplyModel;
use App\Model\SupplierChannelModel;

class ChainTransformer
{
    public function transformList($list)
    {
        $redis = new RedisModel();
        foreach ($list as &$item) {
            $item['create_time'] = $item['create_time'] ? date('Y-m-d H:i:s', $item['create_time']) : '';
            $item['supplier_type_name'] = array_get(config('field.ChainSupplierType'), $item['supplier_type'], '无');
            $item['data_type_name'] = array_get(config('field.ChainDataType'), $item['data_type'], '无');
        }
        unset($item);

        return $list;
    }

}