WithdrawApply.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\common\model;
  20. use app\common\enum\WithdrawEnum;
  21. use app\common\service\FileService;
  22. use think\model\concern\SoftDelete;
  23. /**
  24. * 提现模型
  25. * Class WithdrawApply
  26. * @package app\common\model
  27. */
  28. class WithdrawApply extends BaseModel
  29. {
  30. use SoftDelete;
  31. protected $deleteTime = 'delete_time';
  32. /**
  33. * @notes 类型获取器
  34. * @param $value
  35. * @return string|string[]
  36. * @author Tab
  37. * @date 2021/8/6 18:48
  38. */
  39. public function getTypeDescAttr($value)
  40. {
  41. return WithdrawEnum::getTypeDesc($value);
  42. }
  43. /**
  44. * @notes 状态获取器
  45. * @param $value
  46. * @return string|string[]
  47. * @author Tab
  48. * @date 2021/8/6 18:51
  49. */
  50. public function getStatusDescAttr($value, $data)
  51. {
  52. return WithdrawEnum::getStatusDesc($value, false, $data);
  53. }
  54. function getWechatChangeWaitReceiveAttr($value, $data)
  55. {
  56. return WithdrawEnum::wechatChangeIsWaitReceive($data);
  57. }
  58. /**
  59. * @notes 转账凭证
  60. * @param $value
  61. * @return string|string[]
  62. * @author cjhao
  63. * @date 2022/3/17 10:57
  64. */
  65. public function getTransferVoucherAttr($value){
  66. if($value){
  67. return FileService::getFileUrl($value);
  68. }
  69. return $value;
  70. }
  71. /**
  72. * @notes 转账时间
  73. * @param $value
  74. * @return false|string
  75. * @author cjhao
  76. * @date 2022/3/17 11:26
  77. */
  78. public function getTransferTimeAttr($value){
  79. if($value){
  80. return date('Y-m-d H:i:s',$value);
  81. }
  82. return $value;
  83. }
  84. }