You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

5 years ago
  1. <?php
  2. namespace App\Model\v3;
  3. use App\Model\Model;
  4. use Hyperf\Database\Model\Builder;
  5. class Employees extends Model
  6. {
  7. protected $positions = [
  8. 1=>'董事长',
  9. 2=>'总经理',
  10. 3=>'人力资源总监',
  11. 4=>'CTO',
  12. 5=>'财务经理',
  13. 6=>'运营总监',
  14. 7=>'招商总监',
  15. 8=>'PHP研发主管',
  16. 9=>'迁江智慧商城主管',
  17. 10=>'拓展部主管',
  18. 11=>'拓展部副主管',
  19. 12=>'拓展部经理',
  20. 13=>'运维部经理',
  21. 14=>'产品主管',
  22. 15=>'策划经理',
  23. 16=>'运维部副经理',
  24. 17=>'新媒体运营',
  25. 18=>'平面设计师',
  26. 19=>'UI设计师',
  27. 20=>'前端开发工程师',
  28. 21=>'PHP研发工程师',
  29. 22=>'测试工程师',
  30. 23=>'招商经理',
  31. 24=>'服务站管理员',
  32. 25=>'运维专员',
  33. 26=>'拓展经理',
  34. 27=>'行政助理',
  35. 28=>'出纳',
  36. 29=>'骑手',
  37. 30=>'服务专员',
  38. ];
  39. protected $table = 'lanzu_employees';
  40. protected $casts = [
  41. 'position' => 'array'
  42. ];
  43. protected function boot(): void
  44. {
  45. parent::boot();
  46. self::addGlobalScope('normal', function (Builder $builder) {
  47. $builder->where([$this->getTable().'.status' => 1]);
  48. });
  49. }
  50. }