SendOrderBreakevenStatsTransformer.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: hp
  5. * Date: 2017/11/22
  6. * Time: 14:17
  7. */
  8. namespace App\Http\Controllers\Manage\SendOrder\Transformers;
  9. use Hashids;
  10. class SendOrderBreakevenStatsTransformer
  11. {
  12. public function transform($sendOrderBreakevenStatsItem)
  13. {
  14. return [
  15. 'id' => $sendOrderBreakevenStatsItem->id,
  16. 'distribution_channel_id' => $sendOrderBreakevenStatsItem->distribution_channel_id,
  17. 'distribution_channel_name' => $sendOrderBreakevenStatsItem->distribution_channel_name,
  18. 'official_account_id' => $sendOrderBreakevenStatsItem->official_account_id,
  19. 'official_account_name' => $sendOrderBreakevenStatsItem->official_account_name,
  20. 'date' => $sendOrderBreakevenStatsItem->date,
  21. 'force_user_num' => $sendOrderBreakevenStatsItem->force_user_num,
  22. 'total_force_user_num' => $sendOrderBreakevenStatsItem->total_force_user_num,
  23. 'unsubscribe_in_one_day_user_num' => $sendOrderBreakevenStatsItem->unsubscribe_in_one_day_user_num,
  24. 'created_at' => date("Y-m-d H:i:s", strtotime($sendOrderBreakevenStatsItem->created_at)),
  25. 'updated_at' => date("Y-m-d H:i:s", strtotime($sendOrderBreakevenStatsItem->updated_at)),
  26. 'recharge_amount_in_one_day' => $sendOrderBreakevenStatsItem->recharge_amount_in_one_day,
  27. 'recharge_amount_in_three_days' => $sendOrderBreakevenStatsItem->recharge_amount_in_three_days,
  28. 'recharge_amount_in_one_month' => $sendOrderBreakevenStatsItem->recharge_amount_in_one_month,
  29. 'recharge_amount_in_two_months' => $sendOrderBreakevenStatsItem->recharge_amount_in_two_months,
  30. 'recharge_amount_in_three_months' => $sendOrderBreakevenStatsItem->recharge_amount_in_three_months
  31. ];
  32. }
  33. }