Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

arch(domain): split the Incident aggregate and move German ETB wording and presentation types out of Domain

Đang mở
#299 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, csharp, sqlite
Lĩnh vực
backend, databases

Hướng nghiên cứu

Start with src/LageBuch.Domain/Incident.cs, especially Rehydrate, the feature areas, and the German text noted in the issue; also read Formatting.cs and IncidentPdfSections.cs and their comments. The proposal offers several architectural directions rather than a scoped change, so first agree on one direction with maintainers. Done means that agreed refactor is implemented while preserving the aggregate's invariants and the Android build constraints.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

From the 2026-09-09 architecture review of main (35d86e1). Not urgent; a direction for when the next feature lands in Incident.

Incident (src/LageBuch.Domain/Incident.cs) is 1 112 lines with about 45 public members across ten feature areas, a 22-parameter Rehydrate (:122) that mirrors the SQLite table set, and it composes German ETB text inside the aggregate (Label :615, StatusChangeText :666, and every AppendSystemEntry literal such as "Einsatz begonnen"). Exception messages are end-user German too (:86, :643). Formatting.cs (de-DE date formats, em-dash placeholder) and IncidentPdfSections.cs (PDF section flags) are presentation concerns living in Domain.

The domain is otherwise exemplary: zero references, private setters, IReadOnlyList everywhere, invariants via EnsureOpen.

Proposal

  • Split Incident into partial classes per feature area (Forces, Scba, CoMeasurement, Tasks, Files, Journal) with the shared guards in the core file; or extract sub-aggregates where the feature has its own invariants (CO measurement is a good first candidate).
  • Route system-entry wording through a small ISystemEntryText (or resource) so wording and locale are not Domain changes.
  • Replace the 22-parameter Rehydrate with a IncidentSnapshot-style record that both the repository and SnapshotMapper build.
  • Move Formatting and IncidentPdfSections to Documents/AppLogic once the Android build graph allows (the comment in IncidentPdfSections.cs explains why they are parked in Domain).
Ngôn ngữ chính
C#
Star
1
Fork
3
Merge trung bình
4 giờ 49 phút
Pull request đã merge (30 ngày)
177

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CodeForFire/lagebuch

Tất cả issue của CodeForFire/lagebuch

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.