devtools/test/data/schema.py
changeset 2508 b1958ebed570
parent 1977 606923dff11b
child 4212 ab6573088b4a
equal deleted inserted replaced
2507:45248d0ad8a0 2508:b1958ebed570
       
     1 """
       
     2 
       
     3 :organization: Logilab
       
     4 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
       
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
       
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
       
     7 """
       
     8 from yams.buildobjs import EntityType, SubjectRelation, String, Int, Date
       
     9 
       
    10 from cubes.person.schema import Person
       
    11 
       
    12 Person.add_relation(Date(), 'birthday')
       
    13 
       
    14 class Bug(EntityType):
       
    15     title = String(maxsize=64, required=True, fulltextindexed=True)
       
    16     severity = String(vocabulary=('important', 'normal', 'minor'), default='normal')
       
    17     cost = Int()
       
    18     description	= String(maxsize=4096, fulltextindexed=True)
       
    19     identical_to = SubjectRelation('Bug', symetric=True)
       
    20