コード例 #1
0
ファイル: ResCountry.php プロジェクト: hendri30/OpenPrint
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getResCountryStates()
 {
     return $this->hasMany(ResCountryState::className(), ['country_id' => 'id']);
 }
コード例 #2
0
ファイル: ResPartner.php プロジェクト: hendri30/OpenPrint
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getState()
 {
     return $this->hasOne(ResCountryState::className(), ['id' => 'state_id']);
 }