Docter.php 559 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: zilongs
  5. * Date: 20-9-29
  6. * Time: 上午11:12
  7. */
  8. namespace App\Models;
  9. class Docter extends BaseModel
  10. {
  11. protected $casts = [
  12. 'label' => 'json',
  13. ];
  14. public function office()
  15. {
  16. return $this->belongsTo(Office::class)->select(['id', 'name']);
  17. }
  18. public function qualification()
  19. {
  20. return $this->belongsTo(Qualification::class)->select(['id', 'name']);
  21. }
  22. public function organization()
  23. {
  24. return $this->belongsToMany(Organization::class);
  25. }
  26. }