예제 #1
0
파일: User.php 프로젝트: ninetor/newerp
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getChats()
 {
     return $this->hasMany(Chat::className(), ['user_id' => 'id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getChat()
 {
     return $this->hasOne(Chat::className(), ['id' => 'chat_id']);
 }