Team.php 479 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: zilongs
  5. * Date: 20-10-4
  6. * Time: 下午10:09
  7. */
  8. namespace App\Models;
  9. class Team extends BaseModel
  10. {
  11. public function TeamDocter()
  12. {
  13. return $this->belongsTo(TeamDocter::class,'team_id','id');
  14. }
  15. public function docter()
  16. {
  17. return $this->belongsToMany(Docter::class, 'team_docters');
  18. }
  19. public function DocterOrganization(){
  20. return $this->belongsTo(DocterOrganization::class);
  21. }
  22. }