Mentorship: session booking + ICS emails (Phase 6.4)
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- csharp, postgresql
- 領域
- api, backend, backend-api-design
調査の方向性
まず #9 と #10 の作業を確認し、次に既存の IEndpointModule.MapEndpoints パターンと tests/CommunityPro.Tests/Members/MembersTestHarness.cs のテストハーネスに従ってください。ここで説明されている3つのセッションエンドポイントと予約/メールの動作を実装し、DST の両方の切り替え、メンター関係をまたぐ重複、同時予約、アサートされた ICS の内容をカバーするテストを追加してください。
索引モデルが issue の本文から書いたものです。
説明
Scope
Book sessions against mentor availability, with calendar-attachment emails.
Data model
public sealed class Session
{
public Guid Id { get; set; }
public Guid MentorshipId { get; set; }
public DateTimeOffset StartUtc { get; set; } // stored UTC, always
public int DurationMinutes { get; set; } // 30 | 60
public SessionStatus Status { get; set; } // Scheduled | Completed | Cancelled
public string? MeetingUrl { get; set; } // mentor-provided free text (Meet/Zoom)
}
Endpoints (participants of the mentorship only)
| Method | Path | Notes |
|---|---|---|
| GET | /mentorship/{id}/slots?weekOf= |
open slots: availability minus existing sessions, computed in the mentor's IANA tz via NodaTime, returned as UTC instants |
| POST | /mentorship/{id}/sessions |
book; validations below |
| POST | /mentorship/sessions/{id}/cancel |
either participant, only while Scheduled |
Booking validations
- Slot falls entirely inside the mentor's availability (evaluated in mentor-local time — DST-correct via NodaTime).
- No overlap with any of the mentor's existing
Scheduledsessions (across all their mentorships). - Start ≥ 12h in the future.
- Duration ∈ {30, 60}; mentorship is
Active.
Emails
Booked/cancelled → both parties via Brevo, with an .ics attachment generated via Ical.Net (UTC times, summary, meeting URL when present). Best-effort as always.
Error codes
mentorship.not_found, mentorship.slot_unavailable, mentorship.slot_conflict, mentorship.too_soon, mentorship.invalid_state, mentorship.forbidden
Dependencies
Blocked by #9 and #10.
Acceptance criteria
- DST boundary tests are mandatory: a slot spanning a DST transition in e.g.
Europe/LondonorAmerica/New_Yorkbooks correctly; test both spring-forward and fall-back weeks - Overlap check covers sessions from the mentor's other mentorships
- Concurrent booking of the same slot → exactly one succeeds
- ICS content asserted in tests (times, attendees)
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
DbContextmapped 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 (seeMembers/MembersTestHarness.cs).
- 主要言語
- C#
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CommunityPro/community-pro-api のほかの issue
-
cross-cutting decision
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
cross-cutting
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
-
admin
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
admin
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
sponsorship
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
CommunityPro/community-pro-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
stryker-mutator/stryker-net#3892 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MobiFlight/MobiFlight-Connector#3419 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Kryptos-FR/MarkView.Avalonia#105 ·
メンテナーはふだん 1 日以内に返信
-
[辞書]オープン提案 辞書
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信