예제 #1
0
파일: Country.php 프로젝트: 92Sam/casein-v2
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSysStates()
 {
     return $this->hasMany(SysState::className(), ['country_id' => 'id']);
 }
예제 #2
0
파일: City.php 프로젝트: 92Sam/casein-v2
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getState()
 {
     return $this->hasOne(SysState::className(), ['id' => 'state_id']);
 }