equal
deleted
inserted
replaced
|
1 from yams.buildobjs import EntityType, String, SubjectRelation, RelationType |
|
2 |
|
3 |
|
4 class Tag(EntityType): |
|
5 """tags are used by users to mark entities. |
|
6 When you include the Tag entity, all application specific entities |
|
7 may then be tagged using the "tags" relation. |
|
8 """ |
|
9 name = String(required=True, fulltextindexed=True, unique=True, |
|
10 maxsize=128) |
|
11 # when using this component, add the Tag tag X relation for each type that |
|
12 # should be taggeable |
|
13 tags = SubjectRelation('Tag', description="tagged objects") |
|
14 |
|
15 |
|
16 class tags(RelationType): |
|
17 """indicates that an entity is classified by a given tag""" |