cubicweb/server/test/data/cubicweb_tag/schema.py
changeset 12515 2d43c8b30ef0
equal deleted inserted replaced
12514:eac7f5b20f9f 12515:2d43c8b30ef0
       
     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"""