123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- /**
- * Created by PhpStorm.
- * User: zilongs
- * Date: 20-9-29
- * Time: 上午11:12
- */
- namespace App\Models;
- class Docter extends BaseModel
- {
- protected $casts = [
- 'label' => 'json',
- ];
- public function office()
- {
- return $this->belongsTo(Office::class)->select(['id', 'name']);
- }
- public function qualification()
- {
- return $this->belongsTo(Qualification::class)->select(['id', 'name']);
- }
- public function organization()
- {
- return $this->belongsToMany(Organization::class);
- }
- public function evaluate()
- {
- return $this->hasMany(Evaluate::class)->where('status', 2);
- }
- }
|