初始化仓库

This commit is contained in:
2024-09-19 11:32:39 +08:00
commit 8f5315e936
921 changed files with 76455 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?php
namespace common\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
class ServInfo extends \common\modelsgii\ServInfo
{
public function behaviors()
{
return [
[
'class' => TimestampBehavior::class,
'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at','updated_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
],
],
];
}
//关联职称
public function getTitle()
{
return $this->hasOne(DoctorTitle::className(),['id'=>'title_id']);
}
//关联科室
public function getDepart()
{
return $this->hasOne(HospitalDepartment::className(),['id'=>'depart_id']);
}
//关联医院
public function getHospital()
{
return $this->hasOne(Hospital::className(),['id'=>'hospital_id']);
}
//关联院区
public function getYard()
{
return $this->hasOne(HospitalYard::className(),['id'=>'yard_id']);
}
}