You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(api): implement centralized tag collection
Create a dedicated `tags` collection to centralize tag management across
the application. This replaces the previous string-based tag association
with a reference-based model using tag IDs.
The schema for a tag is as follow:
```json
{
"_id": ObjectId,
"tenant_id": String,
"created_at": Time,
"updated_at": Time,
"name": String
}
```
Update all tag-related collections to use tag IDs instead of tag names.
A migration handles the conversion of existing tag data to the new
format.
API response format now includes tag objects:
```json
{
...
"tags": [
{ "name": String },
{ "name": String },
{ "name": String }
]
}
```
Implement generic tag management methods in the store layer to handle
tag operations (push/pull) consistently across all taggable collections.
Add new query options to filter items by tags.
Introduce dual tag representation in taggable entities:
- TagsID: Internal array of tag IDs (not exposed via API)
- Tags: Array of models.Tag objects for API responses
0 commit comments