예제 #1
0
파일: Country.php 프로젝트: BeforyDeath/tfa
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCity()
 {
     return $this->hasMany(City::className(), ['country_code' => 'code']);
 }
예제 #2
0
 public function getCity()
 {
     return $this->hasOne(City::className(), ['Id' => 'cityId']);
 }
예제 #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCityTo()
 {
     return $this->hasOne(City::className(), ['code' => 'city_to_code']);
 }