public function getViews() { return $this->hasMany(View::className(), ['id' => 'view_id'])->viaTable('sale_view', ['sale_id' => 'id']); }