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.
概要
ユーザーの複数部門管理機能を実装しました。user_groupsテーブルを使用してユーザーと部門の中間テーブル管理を行えるようになります。
主な変更点
1. OpenAPI仕様の追加
GET /user_groups: user_groups一覧取得(ユーザーID・部門IDでの絞り込み対応)POST /user_groups: user_group作成(ユーザーを部門に追加)DELETE /user_groups/{id}: user_group削除(ユーザーから部門を削除)GET /user_groups/user/{user_id}: ユーザーの所属部門一覧取得POST /user_groups/bulk: ユーザーの部門一括更新2. スキーマ定義の追加
userGroup: 基本的なuser_group情報createUserGroup: user_group作成用userGroupWithDivision: 部門情報を含むuser_groupbulkUpdateUserGroups: 一括更新用3. フロントエンド実装
useGetUserGroupsUserUserId,usePutUsersId,usePostUserGroupsBulk)を活用データベース設計
既存のuser_groupsテーブルを活用:
テスト項目
備考
make genで自動生成されています🤖 Generated with Claude Code