Skip to content

[Week7 - jbk] Task3: Add Tag model with many-to-many relationship#51

Open
Candyroom136 wants to merge 3 commits into
mainfrom
week7-jbk-task3
Open

[Week7 - jbk] Task3: Add Tag model with many-to-many relationship#51
Candyroom136 wants to merge 3 commits into
mainfrom
week7-jbk-task3

Conversation

@Candyroom136

Copy link
Copy Markdown

Summary

  • Added Tag model with unique name constraint
  • Created note_tags association table for many-to-many relationship between Notes and Tags
  • Added 5 new endpoints: list/create/delete tags, attach/detach tags to notes
  • Updated NoteRead schema to include tags

Testing

$ make test
10 passed (3 existing + 7 new)
  • Tests cover: tag CRUD, attach/detach, 404 handling, empty tags default, validation

Tradeoffs & Follow-ups

  • Tag names are unique — duplicate creation will fail with 500 (could add friendlier error)
  • No pagination on tags endpoint (assuming small number of tags)
  • Deleting a tag doesn't cascade-notify notes that had it

🤖 Generated with Claude Code

jeongbinkim and others added 3 commits March 17, 2026 13:14
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