# Generic tags zome ## User stories - An agent should be able to tag any entry with any tag - An agent should be able to query all existing tags - An agent should be able to query which tags is an entry tagged with - An agent should be able to query all the entires tagged with a certain tag ## Entry structure This first anchor type is from [holochain_anchors](https://github.com/holochain/holochain_anchors) ```rust Entry "anchor" { struct Anchor { anchor_type: String, anchor_text: Option<String> } Links: { anchor->entry entry->anchor } } ``` > All anchors will be created like this: > ```rust > { > anchor_type: "tag", > anchor_text: "<ACTUAL_TAG>", > } > ``` ## Entry relationship diagram ```mermaid graph TD subgraph tags zome subgraph anchors all_tags-->science all_tags-->religion end subgraph posts science-->post1 post1-->science end end ``` > posts is only an example: links could go to any holochain entry ## Validation ### Entries * `anchors`: * Create is valid always * Update or Delete is not valid ### Links * `anchor->entry` & `entry->anchor`: * AddLink: always valid valid * RemoveLink only valid if the author of the AddLink is the one removing the link