<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2017/11/22
 * Time: 14:17
 */

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

use Hashids;

class SendOrderBreakevenStatsTransformer
{
    public function transform($sendOrderBreakevenStatsItem)
    {
        return [
            'id' => $sendOrderBreakevenStatsItem->id,
            'distribution_channel_id' => $sendOrderBreakevenStatsItem->distribution_channel_id,
            'official_account_id' => $sendOrderBreakevenStatsItem->official_account_id,
            'official_account_name' => $sendOrderBreakevenStatsItem->official_account_name,
            'date' => $sendOrderBreakevenStatsItem->date,
            'force_user_num' => $sendOrderBreakevenStatsItem->force_user_num,
            'total_force_user_num' => $sendOrderBreakevenStatsItem->total_force_user_num,
            'unsubscribe_in_one_day_user_num' => $sendOrderBreakevenStatsItem->unsubscribe_in_one_day_user_num,
            'created_at' => date("Y-m-d H:i:s", strtotime($sendOrderBreakevenStatsItem->created_at)),
            'updated_at' => date("Y-m-d H:i:s", strtotime($sendOrderBreakevenStatsItem->updated_at)),
            'recharge_amount_in_one_day' => $sendOrderBreakevenStatsItem->recharge_amount_in_one_day,
            'recharge_amount_in_three_days' => $sendOrderBreakevenStatsItem->recharge_amount_in_three_days,
            'recharge_amount_in_one_month' => $sendOrderBreakevenStatsItem->recharge_amount_in_one_month,
            'recharge_amount_in_two_months' => $sendOrderBreakevenStatsItem->recharge_amount_in_two_months,
            'recharge_amount_in_three_months' => $sendOrderBreakevenStatsItem->recharge_amount_in_three_months
        ];
    }
}