コード例 #1
0
ファイル: Staff.php プロジェクト: shinkarenko/playground
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStores()
 {
     return $this->hasMany(\app\modules\sakila\models\Store::className(), ['manager_staff_id' => 'staff_id']);
 }
コード例 #2
0
ファイル: Inventory.php プロジェクト: shinkarenko/playground
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStore()
 {
     return $this->hasOne(\app\modules\sakila\models\Store::className(), ['store_id' => 'store_id']);
 }
コード例 #3
0
ファイル: Address.php プロジェクト: shinkarenko/playground
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStores()
 {
     return $this->hasMany(\app\modules\sakila\models\Store::className(), ['address_id' => 'address_id']);
 }