Serviceapplys.php 877 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Serviceapplys extends Model
  5. {
  6. //
  7. protected $table = 'service_applys';
  8. public function docter(){
  9. return $this->belongsTo(Docter::class);
  10. }
  11. public function ondocter()
  12. {
  13. return $this->hasOne(Docter::class,'id','docter_id');
  14. }
  15. public function docterorganization()
  16. {
  17. return $this->hasMany(DocterOrganization::class,'docter_id','docter_id');
  18. }
  19. public function organization()
  20. {
  21. return $this->belongsToMany('App\Models\Organization','docter_organization','docter_id','id');
  22. }
  23. // private static $_post_type =[
  24. // 1 => '图文',
  25. // 2 => '电话',
  26. // 3 => '问诊'
  27. // ];
  28. // private static $_post_status =[
  29. // 1 => '审核',
  30. // 2 => '通过',
  31. // 3 => '未通过'
  32. // ];
  33. }