server/test/data/schema.py
changeset 7166 dde161937d3e
parent 6279 42079f752a9c
child 7236 b91205ada414
equal deleted inserted replaced
7165:b817d44cb606 7166:dde161937d3e
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 
    18 
    19 from yams.buildobjs import (EntityType, RelationType, RelationDefinition,
    19 from yams.buildobjs import (EntityType, RelationType, RelationDefinition,
    20                             SubjectRelation, RichString, String, Int, Float,
    20                             SubjectRelation, RichString, String, Int, Float,
    21                             Boolean, Datetime)
    21                             Boolean, Datetime, TZDatetime)
    22 from yams.constraints import SizeConstraint
    22 from yams.constraints import SizeConstraint
    23 from cubicweb.schema import (WorkflowableEntityType,
    23 from cubicweb.schema import (WorkflowableEntityType,
    24                              RQLConstraint, RQLUniqueConstraint,
    24                              RQLConstraint, RQLUniqueConstraint,
    25                              ERQLExpression, RRQLExpression)
    25                              ERQLExpression, RRQLExpression)
    26 
    26 
   112     ass    = String(maxsize=128)
   112     ass    = String(maxsize=128)
   113     web    = String(maxsize=128)
   113     web    = String(maxsize=128)
   114     tel    = Int()
   114     tel    = Int()
   115     fax    = Int()
   115     fax    = Int()
   116     datenaiss = Datetime()
   116     datenaiss = Datetime()
       
   117     tzdatenaiss = TZDatetime()
   117     test   = Boolean(__permissions__={
   118     test   = Boolean(__permissions__={
   118         'read': ('managers', 'users', 'guests'),
   119         'read': ('managers', 'users', 'guests'),
   119         'update': ('managers',),
   120         'update': ('managers',),
   120         })
   121         })
   121     description = String()
   122     description = String()