<?php

namespace App\Http\Controllers\Wechat\OfficialAccount\Transformers;

class WechatTemplatesMsgTransformer
{
    public function transform($wechatTemplatesMsg){
        return [
            'id'       =>  $wechatTemplatesMsg->id,
            'template_id'       =>  $wechatTemplatesMsg->template_id,
            'name'       =>  $wechatTemplatesMsg->name,
            'send_time'       =>  $wechatTemplatesMsg->send_time,
            'template_content'       =>  $wechatTemplatesMsg->template_content,
            'redirect_url'       =>  $wechatTemplatesMsg->redirect_url,
            'appid'       =>  $wechatTemplatesMsg->appid,
            'status'       =>  $wechatTemplatesMsg->status,
            'remark'       =>  $wechatTemplatesMsg->remark,
            'distribution_channel_id'       =>  $wechatTemplatesMsg->distribution_channel_id,
            'subscribe_time'       =>  $wechatTemplatesMsg->subscribe_time,
            'sex'       =>  $wechatTemplatesMsg->sex,
            'balance'       =>  $wechatTemplatesMsg->balance,
            'order_type'       =>  $wechatTemplatesMsg->order_type,
            'category_id'       =>  $wechatTemplatesMsg->category_id,
            'example'       => $wechatTemplatesMsg->wechatTemplates->wechatPublicTemplates->example,
            'common_template_id'       => $wechatTemplatesMsg->wechatTemplates->wechatPublicTemplates->common_template_id,
            'title'       => $wechatTemplatesMsg->wechatTemplates->wechatPublicTemplates->title,
            'primary_industry'       => $wechatTemplatesMsg->wechatTemplates->wechatPublicTemplates->primary_industry,
            'deputy_industry'       => $wechatTemplatesMsg->wechatTemplates->wechatPublicTemplates->deputy_industry,
            'content'       => $wechatTemplatesMsg->wechatTemplates->wechatPublicTemplates->content,
            'example'       => $wechatTemplatesMsg->wechatTemplates->wechatPublicTemplates->example,
        ];
    }
}