Skip to content

refactor: move dublicates - #52

Merged
saijaku0 merged 1 commit into
mainfrom
fix/update-appt-get-by-ud
Feb 15, 2026
Merged

refactor: move dublicates#52
saijaku0 merged 1 commit into
mainfrom
fix/update-appt-get-by-ud

Conversation

@saijaku0

@saijaku0 saijaku0 commented Feb 15, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Refactor
    • Improved the internal structure of appointment data handling to reduce code duplication and enhance maintainability.

@saijaku0
saijaku0 merged commit cf1b8bd into main Feb 15, 2026
2 checks passed
@coderabbitai

coderabbitai Bot commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request refactors appointment DTOs by introducing a new base AppointmentBaseDto record containing shared properties, then restructuring AppointmentDetailDto and AppointmentListDto to inherit from it, eliminating property duplication. A minor formatting adjustment is also applied to MappingExtensions.cs.

Changes

Cohort / File(s) Summary
Formatting
src/Booking/Booking.Application/Appointments/Common/Extensions/MappingExtensions.cs
Method parameter list reformatted onto new line; no functional changes.
DTO Base Class Introduction
src/Booking/Booking.Application/Appointments/Dtos/AppointmentBaseDto.cs
New public record AppointmentBaseDto created with 13 properties (identifiers, presentation fields, metadata, timing, and status) using init-only and nullable patterns.
DTO Inheritance Refactoring
src/Booking/Booking.Application/Appointments/Dtos/AppointmentDetailDto.cs, src/Booking/Booking.Application/Appointments/Dtos/AppointmentListDto.cs
AppointmentDetailDto restructured to inherit from AppointmentBaseDto with 13 properties removed; AppointmentListDto converted from class to record with inheritance of AppointmentBaseDto, consolidating shared appointment data.

Poem

🐰 A base was born to hold the shared appointment truth,
Where details and lists now inherit with youth,
No duplication mars our DTO design,
Just lean, focused records—elegantly aligned! ✨

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/update-appt-get-by-ud

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@saijaku0
saijaku0 deleted the fix/update-appt-get-by-ud branch February 15, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant