46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use yii\behaviors\TimestampBehavior;
|
|
use yii\db\ActiveRecord;
|
|
|
|
class FollowDoctor extends \common\modelsgii\FollowDoctor
|
|
{
|
|
|
|
public function behaviors()
|
|
{
|
|
return [
|
|
[
|
|
'class' => TimestampBehavior::class,
|
|
'attributes' => [
|
|
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at','updated_at'],
|
|
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
//关联基础信息-医生
|
|
public function getDocInfo()
|
|
{
|
|
return $this->hasOne(DoctorInfo::className(),['su_id'=>'su_id']);
|
|
}
|
|
|
|
//关联认证信息-医生
|
|
public function getDocIdentity()
|
|
{
|
|
return $this->hasOne(DoctorIdentity::className(),['su_id'=>'su_id']);
|
|
}
|
|
//关联执业信息-医生
|
|
public function getDocPracticing()
|
|
{
|
|
return $this->hasOne(DoctorPracticing::className(),['su_id'=>'su_id']);
|
|
}
|
|
|
|
//关联服务信息-医生
|
|
public function getDocService()
|
|
{
|
|
return $this->hasOne(DoctorService::className(),['su_id'=>'su_id']);
|
|
}
|
|
|
|
} |