12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class Serviceapplys extends Model
- {
- //
- protected $table = 'service_applys';
- protected $fillable = ['docter_id'];
- public function docter(){
- return $this->belongsTo(Docter::class);
- }
- public function ondocter()
- {
- return $this->hasOne(Docter::class,'id','docter_id');
- }
- public function docterorganization()
- {
- return $this->hasMany(DocterOrganization::class,'docter_id','docter_id');
- }
- public function organization()
- {
- return $this->belongsToMany('App\Models\Organization','docter_organization','docter_id','id');
- }
- // private static $_post_type =[
- // 1 => '图文',
- // 2 => '电话',
- // 3 => '问诊'
- // ];
- // private static $_post_status =[
- // 1 => '审核',
- // 2 => '通过',
- // 3 => '未通过'
- // ];
- }
|