Skip to content

SubjectにFaculty追加#24

Merged
hikaru-0602 merged 4 commits intomainfrom
fix/faculty-name
Mar 27, 2026
Merged

SubjectにFaculty追加#24
hikaru-0602 merged 4 commits intomainfrom
fix/faculty-name

Conversation

@hikaru-0602
Copy link
Copy Markdown
Contributor

やったこと

  • Faculty追加した

確認したこと

  • [ ]

メモ

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Subject が持つ Faculties 情報に、Faculty の詳細(id/name/email)を載せられるようにするための変更です。従来は SubjectFaculty に FacultyID しかなく API でも id のみ返していましたが、Faculty を関連として取得・変換する方向に寄せています。

Changes:

  • SubjectFaculty(domain)を FacultyID から Faculty 保持に変更
  • DBモデル SubjectFacultyFaculty 関連を追加し、取得時に Faculties.Faculty を preload
  • handler converter で facultyToAPI(f.Faculty) を用いて Faculty 詳細を返すように変更

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
internal/repository/subject.go Subject 取得時の preload を Faculties.Faculty まで拡張
internal/handler/converter.go Subject/SubjectSummary の faculties 変換を Faculty 詳細返却に変更
internal/domain/subject.go SubjectFaculty が Faculty を内包する形に変更
internal/database/subject.go DBの SubjectFaculty に Faculty 関連を追加し、domain 変換も Faculty 詳細前提に変更

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@masaya-osuga masaya-osuga left a comment

Choose a reason for hiding this comment

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

Copilotの指摘が正しそう

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 27, 2026 10:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@masaya-osuga masaya-osuga left a comment

Choose a reason for hiding this comment

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

LGTM

@hikaru-0602 hikaru-0602 merged commit dd30da1 into main Mar 27, 2026
5 checks passed
@hikaru-0602 hikaru-0602 deleted the fix/faculty-name branch March 27, 2026 10:29
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.

4 participants