AgentAttrsModel.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * 描述.
  4. *
  5. * @author nj
  6. * @date 2021-05-18 20:46:19
  7. */
  8. namespace App\Models\Mysql;
  9. class AgentAttrsModel extends BaseMysql
  10. {
  11. protected $table = 'agent_attrs';
  12. /**
  13. * UUID 键名
  14. * @var string
  15. */
  16. protected $uuidKeyName = 'agent_uid';
  17. /**
  18. * 自定义字段.
  19. *
  20. * todo 暂时没用,后面要用上
  21. *
  22. * @var array
  23. */
  24. public $appends = ['td_withdraw_money'];
  25. public function getCommonSubffixFields()
  26. {
  27. $fields = array_merge(self::getCommonOrderSubffixFields(), self::getCommonUsersSubffixFields());
  28. return $fields;
  29. }
  30. public function getCommonOrderSubffixFields()
  31. {
  32. $fileds = [
  33. 'order_total', 'order_success', 'order_failed', 'order_money', 'order_success_money',
  34. 'android_total', 'android_success', 'android_failed', 'android_money', 'android_success_money',
  35. 'ios_total', 'ios_success', 'ios_failed', 'ios_money', 'ios_success_money',
  36. 'h5_total', 'h5_success', 'h5_failed', 'h5_money', 'h5_success_money',
  37. 'deduction_total', 'deduction_success', 'deduction_failed', 'deduction_money', 'deduction_success_money',
  38. 'commission_money'
  39. ];
  40. return $fileds;
  41. }
  42. public function getCommonUsersSubffixFields()
  43. {
  44. $fields = [
  45. 'users_total', 'users_android_total', 'users_ios_total', 'users_h5_total',
  46. 'users_deduction', 'users_android_deduction', 'users_ios_deduction', 'users_h5_deduction',
  47. ];
  48. return $fields;
  49. }
  50. }