ActiveApplyModel.php 970 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 老猫 <thinkcmf@126.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\love\model;
  12. use think\Model;
  13. class ActiveApplyModel extends Model
  14. {
  15. public function getStatusTextAttr($value, $data)
  16. {
  17. $status = ['', '待审核', '审核通过','审核不通过'];
  18. return $status[$data['check_status']];
  19. }
  20. public function user()
  21. {
  22. return $this->hasOne(UserModel::class,'id','user_id');
  23. }
  24. }