WithdrawApply.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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)
  51. {
  52. return WithdrawEnum::getStatusDesc($value);
  53. }
  54. /**
  55. * @notes 转账凭证
  56. * @param $value
  57. * @return string|string[]
  58. * @author cjhao
  59. * @date 2022/3/17 10:57
  60. */
  61. public function getTransferVoucherAttr($value){
  62. if($value){
  63. return FileService::getFileUrl($value);
  64. }
  65. return $value;
  66. }
  67. /**
  68. * @notes 转账时间
  69. * @param $value
  70. * @return false|string
  71. * @author cjhao
  72. * @date 2022/3/17 11:26
  73. */
  74. public function getTransferTimeAttr($value){
  75. if($value){
  76. return date('Y-m-d H:i:s',$value);
  77. }
  78. return $value;
  79. }
  80. }