示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRegions()
 {
     return $this->hasMany(Region::className(), ['country_id' => 'id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRegion()
 {
     return $this->hasOne(Region::className(), ['id' => 'region_id']);
 }