1
0

ActivityCustomerExportLog.php 800 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. declare(strict_types=1);
  3. namespace app\model;
  4. use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class ActivityCustomerExportLog extends Model
  9. {
  10. /**
  11. * 关联部门
  12. */
  13. public function org()
  14. {
  15. return $this->belongsTo(Org::class);
  16. }
  17. /**
  18. * 关联操作人
  19. */
  20. public function employee()
  21. {
  22. return $this->belongsTo(Employee::class, 'op_employee');
  23. }
  24. /**
  25. * type
  26. */
  27. public function getTypeAttr($value)
  28. {
  29. $types = ['已邀约', '已到店', '已到场', '已交定', '已签单'];
  30. return $types[$value];
  31. }
  32. /**
  33. * 文件名
  34. */
  35. public function getFileAttr($value)
  36. {
  37. return 'https://'.config('app.ali_oss_bindurl').'/'.'activityExport/' . $value . '.csv';
  38. }
  39. }