예제 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStore()
 {
     return $this->hasOne(Store::className(), ['id' => 'store_id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStores()
 {
     return $this->hasMany(Store::className(), ['school_id' => 'id'])->where(['<>', 'status', Store::STATUS_DISABLED])->orderBy('name ASC');
 }