コード例 #1
0
ファイル: Users.php プロジェクト: Andrew-6676/building
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStatuses()
 {
     return $this->hasMany(Statuses::className(), ['id_user' => 'id']);
 }
コード例 #2
0
ファイル: Events.php プロジェクト: Andrew-6676/building
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStatus()
 {
     return $this->hasOne(Statuses::className(), ['id' => 'id_status']);
 }