RefundRecord.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\common\model\refund;
  15. use app\common\enum\RefundEnum;
  16. use app\common\model\BaseModel;
  17. /**
  18. * 退款记录模型
  19. * Class RefundRecord
  20. * @package app\common\model\refund
  21. */
  22. class RefundRecord extends BaseModel
  23. {
  24. /**
  25. * @notes 退款类型描述
  26. * @param $value
  27. * @param $data
  28. * @return string|string[]
  29. * @author 段誉
  30. * @date 2022/12/1 10:41
  31. */
  32. public function getRefundTypeTextAttr($value, $data)
  33. {
  34. return RefundEnum::getTypeDesc($data['refund_type']);
  35. }
  36. /**
  37. * @notes 退款状态描述
  38. * @param $value
  39. * @param $data
  40. * @return string|string[]
  41. * @author 段誉
  42. * @date 2022/12/1 10:44
  43. */
  44. public function getRefundStatusTextAttr($value, $data)
  45. {
  46. return RefundEnum::getStatusDesc($data['refund_status']);
  47. }
  48. /**
  49. * @notes 退款方式描述
  50. * @param $value
  51. * @param $data
  52. * @return string|string[]
  53. * @author 段誉
  54. * @date 2022/12/6 11:08
  55. */
  56. public function getRefundWayTextAttr($value, $data)
  57. {
  58. return RefundEnum::getWayDesc($data['refund_way']);
  59. }
  60. }