Skip to content

[Week7 - Task3] Add Tag model and relationships#48

Open
kminseo03 wants to merge 2 commits into
mainfrom
task3-tags
Open

[Week7 - Task3] Add Tag model and relationships#48
kminseo03 wants to merge 2 commits into
mainfrom
task3-tags

Conversation

@kminseo03

Copy link
Copy Markdown

Summary

  • Add Tag model with unique name constraint and many-to-many relationship to Notes
  • Add note_tags association table with cascade deletes
  • Add TagCreate/TagRead Pydantic schemas; update NoteRead to include tags
  • Add tags router with full CRUD + attach/remove tag endpoints
  • Add 10 tests covering tag CRUD, note-tag associations, duplicates, and edge cases

Test plan

  • All 12 tests pass (make test)
  • Lint clean (make lint)
  • Code formatted (make format)

🤖 Generated with Claude Code

kminseo03 and others added 2 commits March 17, 2026 13:13
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Tag model (id, name unique, created_at) and note_tags association table
- Add tags relationship on Note with selectin loading
- Add TagCreate/TagRead schemas, update NoteRead to include tags
- Add tags router: CRUD + attach/remove tags on notes
- Register tags router in main.py
- Add 10 tag tests covering CRUD, associations, duplicates, and edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant