29 lines
688 B
PHP
29 lines
688 B
PHP
<?php
|
|
|
|
namespace common\models\oldDb;
|
|
|
|
use yii\behaviors\TimestampBehavior;
|
|
use yii\db\ActiveRecord;
|
|
|
|
class PatientVisitRecord extends \common\modelsgii\oldDb\PatientVisitRecord
|
|
{
|
|
|
|
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::class,['su_id'=>'su_id']);
|
|
}
|
|
} |