WithdrawCashFinancialTransformer.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tandunzhao
  5. * Date: 2017/11/17
  6. * Time: 下午4:40
  7. */
  8. namespace App\Http\Controllers\Manage\Finance\Transformers;
  9. class WithdrawCashFinancialTransformer
  10. {
  11. public function transform($withdrawCash){
  12. return [
  13. 'id' => $withdrawCash->id,
  14. 'channel_id' => $withdrawCash->channel_id,
  15. 'channel_name' => $withdrawCash->channel_name,
  16. 'amount' => (float)($withdrawCash->amount),
  17. 'pay_amount' => (float)($withdrawCash->amount - $withdrawCash->tallage),
  18. 'status' => $withdrawCash->wc_status,
  19. 'remark' => $withdrawCash->remark,
  20. 'serial_number' => $withdrawCash->serial_number,
  21. 'is_company' => (float)$withdrawCash->is_company,
  22. 'check_user_id' => $withdrawCash->check_user_id,
  23. 'check_user_name' => $withdrawCash->check_user_name,
  24. 'account_name' => $withdrawCash->account_name,
  25. 'identity_card' => $withdrawCash->identity_card,
  26. 'card_number' => $withdrawCash->card_number,
  27. 'account_bank' => $withdrawCash->account_bank,
  28. 'bank' => $withdrawCash->bank,
  29. 'province' => $withdrawCash->province,
  30. 'created_time' => date('Y-m-d H:i:s',strtotime($withdrawCash->created_at)),
  31. 'updated_time' => date('Y-m-d H:i:s',strtotime($withdrawCash->updated_at)),
  32. 'tallage' => (float)($withdrawCash->tallage),
  33. 'is_frozen' => $withdrawCash->is_frozen,
  34. 'fc_remark' => $withdrawCash->fc_remark
  35. ];
  36. }
  37. }