Recruit.php 633 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class Recruit extends Model
  5. {
  6. public function employee()
  7. {
  8. return $this->hasMany(Employee::class,'recruit','id');
  9. }
  10. public function getEmployeeQrAttr($value)
  11. {
  12. if (empty($value)) return $value;
  13. $domain = config('app.ali_oss_bindurl');
  14. $item = 'https://' . $domain . '/' . $value;
  15. return $item;
  16. }
  17. public function getManagerQrAttr($value)
  18. {
  19. if (empty($value)) return $value;
  20. $domain = config('app.ali_oss_bindurl');
  21. $item = 'https://' . $domain . '/' . $value;
  22. return $item;
  23. }
  24. }