schemas/base.py
branchtls-sprint
changeset 1477 b056a49c16dc
parent 1451 982e8616d9a2
parent 1445 d3c9b075ceb7
child 1742 25a765e756c4
equal deleted inserted replaced
1476:f94b41709ce6 1477:b056a49c16dc
   123     """latest modification time of an entity"""
   123     """latest modification time of an entity"""
   124     cardinality = '11'
   124     cardinality = '11'
   125     subject = '**'
   125     subject = '**'
   126     object = 'Datetime'
   126     object = 'Datetime'
   127 
   127 
       
   128 
   128 class CWProperty(EntityType):
   129 class CWProperty(EntityType):
   129     """used for cubicweb configuration. Once a property has been created you
   130     """used for cubicweb configuration. Once a property has been created you
   130     can't change the key.
   131     can't change the key.
   131     """
   132     """
   132     permissions = {
   133     permissions = {
   195 
   196 
   196 class see_also(RelationType):
   197 class see_also(RelationType):
   197     """generic relation to link one entity to another"""
   198     """generic relation to link one entity to another"""
   198     symetric = True
   199     symetric = True
   199 
   200 
       
   201 
   200 class CWCache(MetaEntityType):
   202 class CWCache(MetaEntityType):
   201     """a simple cache entity characterized by a name and
   203     """a simple cache entity characterized by a name and
   202     a validity date.
   204     a validity date.
   203 
   205 
   204     The target application is responsible for updating timestamp
   206     The target application is responsible for updating timestamp
   211         'add':    ('managers',),
   213         'add':    ('managers',),
   212         'update': ('managers', 'users',),
   214         'update': ('managers', 'users',),
   213         'delete': ('managers',),
   215         'delete': ('managers',),
   214         }
   216         }
   215 
   217 
   216     name = String(required=True, unique=True, indexed=True,
   218     name = String(required=True, unique=True, indexed=True,  maxsize=128,
   217                   description=_('name of the cache'))
   219                   description=_('name of the cache'))
   218     timestamp = Datetime(default='NOW')
   220     timestamp = Datetime(default='NOW')