Skip to content

Refactor: Move intern/public slot type distinction to API layer #1889

@coderabbitai

Description

@coderabbitai

Context

A TODO comment was identified during PR #1878 review indicating an architectural improvement opportunity.

TODO Comment Location: zmsdb/src/Zmsdb/Query/SlotList.php:347
Comment: TODO Unterscheidung nach intern/public sollte erst nach der API erfolgen!
Translation: "TODO: The distinction between intern/public should only happen after the API!"

Added by: matthilo96 on 2026-01-30
Related Commit: a357f64 (feat(ZMSKVR-1164): remove callcenter from all files)

Problem

Currently, the slotType parameter ('public' or 'intern') is being passed through multiple architectural layers:

  • API layer (zmsapi)
  • Database layer (zmsdb)
  • Query layer (Query/SlotList.php)

This violates separation of concerns - business logic about slot type distinctions should not be handled at the database/query layer.

Proposed Solution

Refactor the architecture so that:

  1. The API layer handles the slotType distinction
  2. The database/query layer remains agnostic to business logic
  3. The API layer filters or processes results based on slot type after retrieval

This would improve:

  • Separation of concerns
  • Testability
  • Maintainability
  • Layer independence

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions