Mentorship: mentor directory endpoints (Phase 6.6 backend)

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

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
csharp, postgresql
Lĩnh vực
api, backend, databases

Hướng nghiên cứu

Bắt đầu bằng việc xem xét các issue về dependency #9 và #10, sau đó kiểm tra public contract của Members và tests/Members/MembersTestHarness.cs để tìm các mẫu module hiện có. Truy vết việc đăng ký endpoint mentorship thông qua IEndpointModule.MapEndpoints và xác minh các bộ lọc được liệt kê, thứ tự sắp xếp, phân trang, việc loại trừ theo trạng thái member, cách xử lý capacity, dữ liệu múi giờ và mapping của mentorship.not_found bằng các bài kiểm thử xUnit.

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

Mô tả

mentorship

Scope

Public-to-members directory the frontend grid consumes.

Method Path Auth Notes
GET /mentorship/mentors active member paginated; filters: expertiseTag, acceptingOnly=true
GET /mentorship/mentors/{id} active member mentor detail incl. expertise, capacity headroom, availability summary

Rules

  • Enrich with member card data (display name, title, avatar) via the Members module public contract — no cross-module DbContext reach-ins.
  • Exclude mentors whose underlying member is not Active (pending/deactivated must never surface — query level, not UI level).
  • acceptingOnly filters on IsAcceptingMentees and actual capacity headroom (belt and braces — the flag can lag).
  • Detail endpoint exposes weekly availability in the mentor's timezone plus the IANA id, so the booking UI can convert client-side.

Error codes

mentorship.not_found

Dependencies

Blocked by #9. Capacity headroom needs #10's Mentorship table (soft — can land computing headroom as capacity until M2 merges).

Acceptance criteria

  • Deactivated/pending members filtered out (tested)
  • Tag filter matches case-insensitively
  • Pagination + deterministic ordering (accepting first, then newest opt-in)
Conventions (project-wide, non-negotiable)
  • .NET 9, records for immutable shapes, file-scoped namespaces, primary constructors where they read well. Minimal-API endpoints grouped per module via IEndpointModule.MapEndpoints.
  • Result<T> (SharedKernel) instead of exception-driven control flow. Endpoint results map failures to ProblemDetails with the stable error codes listed above — the frontend keys off them.
  • Module owns its EF Core DbContext mapped to its own Postgres schema. Modules never reference each other's internals — cross-module needs go through a public contract interface or an in-process domain event (IEventPublisher).
  • All external calls (GitHub, Stripe, Brevo, Cloudinary, Meilisearch) behind interfaces owned by the consuming module.
  • Every list endpoint paginated (offset is fine). xUnit tests in tests/CommunityPro.Tests/<Module>/ following the existing harness patterns (see Members/MembersTestHarness.cs).
Ngôn ngữ chính
C#
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 CommunityPro/community-pro-api

Tất cả issue của CommunityPro/community-pro-api

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.