/**
  * Get new message count
  *
  * @return int|string
  */
 public function getNewCount()
 {
     return $this->hasMany(InnerMessage::className(), ['dialog_id' => 'id'])->where(['view' => InnerMessage::tableName()])->count();
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMessage()
 {
     return $this->hasOne(InnerMessage::className(), ['id' => 'message_id']);
 }