/**
* @return \yii\db\ActiveQuery
*/
public function getUserTacks()
{
return $this->hasMany(UserTack::class, ['user_id' => 'id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getTacks()
{
return $this->hasMany(Tack::class, ['id' => 'tack_id'])->viaTable('user_tack', ['user_id' => 'id']);
}