1
0

ActivitySign.php 790 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class ActivitySign extends Model
  5. {
  6. /**
  7. * 二维码地址
  8. */
  9. public function getQrcodeAttr($value)
  10. {
  11. if (empty($value)) return $value;
  12. $ali_oss_bindurl = config('app.ali_oss_bindurl');
  13. $url = 'http://' . $ali_oss_bindurl . '/' . $value;
  14. return $url;
  15. }
  16. /**
  17. * 客户信息
  18. */
  19. public function user()
  20. {
  21. return $this->belongsTo(User::class, 'uid','id');
  22. }
  23. /**
  24. * 活动信息
  25. */
  26. public function activity()
  27. {
  28. return $this->belongsTo(Activity::class, 'aid','id');
  29. }
  30. /**
  31. * 业务员信息
  32. */
  33. public function employee()
  34. {
  35. return $this->belongsTo(Employee::class, 'share_employee_id','id');
  36. }
  37. }