Skip to content

Channel domain layer#161

Merged
scraft-official merged 3 commits intorelease/2.25from
feature/channel-domain-layer
Dec 22, 2025
Merged

Channel domain layer#161
scraft-official merged 3 commits intorelease/2.25from
feature/channel-domain-layer

Conversation

@scraft-official
Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and refactorings to the backend domain and application command classes, primarily focused on enhancing code maintainability, validation, and debugging capabilities. The most significant changes include the addition of @ToString annotations for easier debugging, the introduction of validation constraints to the ChannelMeta class, and a refactor of the Channel entity to streamline meta handling and enforce stricter type checks.

Enhancements to command and meta classes:

  • Added @ToString annotations to all command and meta classes (e.g., ChannelCreationCommand, ProjectCreateCommand, ChannelMeta, and their related meta implementations) to improve logging and debugging by making object string representations more informative. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

Validation and data integrity improvements:

  • Introduced validation annotations (@NotBlank, @Size, @Pattern, etc.) in ChannelMeta to enforce constraints on name, description, and color fields, ensuring data integrity for channel metadata.

Refactoring and logic improvements in the Channel entity:

  • Refactored the Channel class to:
    • Use specific meta types (ChannelCreationMeta, ChannelModificationMeta, ChannelDeletionMeta) in its lifecycle methods (create, modify, delete) for stricter type safety and clearer logic.
    • Replace legacy or commented-out code with updated logic that uses Optional and provides sensible defaults.
    • Add @AllArgsConstructor(onConstructor = @__({ @Deprecated })) and @ToString for better construction and debugging support. [1] [2] [3] [4] [5]

Dependency and import updates:

  • Updated imports to use the new meta type packages (ChannelCreationMeta, ChannelDeletionMeta, ChannelModificationMeta), reflecting the refactored meta model.

These changes collectively improve the maintainability, reliability, and debuggability of the backend codebase, especially around channel and project management logic.

Introduced Jakarta validation annotations to ChannelMeta and ProjectMeta fields to enforce constraints on name, description, and color. Updated Channel to handle new meta types and validation logic for creation, modification, and deletion, ensuring proper field defaults and error handling.
Added Lombok's @tostring annotation to various command and domain model classes across channel, organization, and project modules. This improves debugging and logging by providing readable string representations for these objects.
@scraft-official scraft-official added this to the SPRINT 2 milestone Dec 22, 2025
@scraft-official scraft-official marked this pull request as ready for review December 22, 2025 17:32
@scraft-official scraft-official linked an issue Dec 22, 2025 that may be closed by this pull request
NikodemCyrzan
NikodemCyrzan previously approved these changes Dec 22, 2025
Copy link
Copy Markdown
Collaborator

@NikodemCyrzan NikodemCyrzan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dobra robota 😎
Tylko build zrobił fikołka xD

@scraft-official
Copy link
Copy Markdown
Collaborator Author

XDDDDDDDD, "U MNIE DZIAŁA"

@scraft-official
Copy link
Copy Markdown
Collaborator Author

A jednak nie, :c

image

@scraft-official
Copy link
Copy Markdown
Collaborator Author

Jak dobrze, że jest piepline CI, 😎

@scraft-official
Copy link
Copy Markdown
Collaborator Author

Zaraz się okaże, : )

Added the Lombok @tostring annotation to ProjectFetchCommand and ChannelInitialCreationMeta classes to improve debugging and logging by providing automatic string representations.
@scraft-official
Copy link
Copy Markdown
Collaborator Author

Przeszło, : )))

@scraft-official scraft-official merged commit 536de2b into release/2.25 Dec 22, 2025
1 check passed
scraft-official added a commit that referenced this pull request Jan 4, 2026
* Add validation to ChannelMeta and ProjectMeta fields

Introduced Jakarta validation annotations to ChannelMeta and ProjectMeta fields to enforce constraints on name, description, and color. Updated Channel to handle new meta types and validation logic for creation, modification, and deletion, ensuring proper field defaults and error handling.

* Add @tostring to command and domain model classes

Added Lombok's @tostring annotation to various command and domain model classes across channel, organization, and project modules. This improves debugging and logging by providing readable string representations for these objects.

* Add @tostring to ProjectFetchCommand and ChannelInitialCreationMeta

Added the Lombok @tostring annotation to ProjectFetchCommand and ChannelInitialCreationMeta classes to improve debugging and logging by providing automatic string representations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Opracować - Domain - Channel - Modyfikatory

2 participants