コード例 #1
0
ファイル: Municipio.php プロジェクト: RodmanII/sgm
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getHospitals()
 {
     return $this->hasMany(Hospital::className(), ['cod_municipio' => 'codigo']);
 }
コード例 #2
0
ファイル: Nacimiento.php プロジェクト: RodmanII/sgm
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCodHospital()
 {
     return $this->hasOne(Hospital::className(), ['codigo' => 'cod_hospital']);
 }