Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Room リソースの CRUD API を既存の handler/service/repository/domain/database レイヤ構成に沿って追加し、サーバ起動時の DI と AutoMigrate に組み込む PR です。
Changes:
- Room の domain/database モデルと GORM AutoMigrate 対象を追加
- RoomRepository / RoomService を新設し、CRUD を実装
- Rooms v1 の handler 実装と DI(NewHandler/main)配線を追加
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/service/room.go | RoomService と repository IF を追加 |
| internal/repository/room.go | Room の CRUD を GORM で実装 |
| internal/handler/room_create.go | Room 作成 API 実装 |
| internal/handler/room_update.go | Room 更新 API 実装(404 マッピング含む) |
| internal/handler/room_delete.go | Room 削除 API 実装(404 マッピング含む) |
| internal/handler/room_detail.go | Room 詳細 API 実装(404 マッピング含む) |
| internal/handler/room_list.go | Room 一覧 API 実装(※フィルタの扱い要確認) |
| internal/handler/handler.go | Handler に roomSvc を追加し DI を拡張 |
| internal/handler/converter.go | domain↔api の Room 変換を追加 |
| internal/domain/room.go | Room/Floor の domain 型を追加 |
| internal/database/room.go | GORM モデルと domain 変換を追加 |
| internal/database/migrate.go | AutoMigrate に Room を追加 |
| cmd/server/main.go | Room の repository/service を生成し Handler に注入 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Adminで動作確認したいかも |
masaya-osuga
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
やったこと
RoomのAPI実装してみた.とりあえず実装しただけなのでいらなかったら削除してもいいよ
Update OpenAPI schema #19 にPR出してる
Close
[ ]
確認したこと
メモ