test/data/schema.py
author sylvain.thenault@logilab.fr
Tue, 28 Apr 2009 15:36:04 +0200
branchtls-sprint
changeset 1502 e25be3c82947
parent 1476 f94b41709ce6
child 1977 606923dff11b
permissions -rw-r--r--
fix i18n catalog compilation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
744
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
     1
class Personne(EntityType):
748
eec752381926 unittest_entity ok
sylvain.thenault@logilab.fr
parents: 744
diff changeset
     2
    nom = String(required=True)
744
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
     3
    prenom = String()
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
     4
    type = String()
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
     5
    travaille = SubjectRelation('Societe')
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
     6
    evaluee = SubjectRelation(('Note', 'Personne'))
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
     7
    connait = SubjectRelation('Personne', symetric=True)
1476
f94b41709ce6 delete-trailing-whitespaces
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
     8
744
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
     9
class Societe(EntityType):
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    10
    nom = String()
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    11
    evaluee = SubjectRelation('Note')
1476
f94b41709ce6 delete-trailing-whitespaces
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    12
744
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    13
class Note(EntityType):
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    14
    type = String()
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    15
    ecrit_par = SubjectRelation('Personne')
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    16
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    17
class SubNote(Note):
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    18
    __specializes_schema__ = True
750
89e997bc2bf1 update test for new test schema
sylvain.thenault@logilab.fr
parents: 748
diff changeset
    19
    description = String()
744
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    20
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    21
class tags(RelationDefinition):
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    22
    subject = 'Tag'
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    23
    object = ('Personne', 'Note')
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    24
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    25
class evaluee(RelationDefinition):
1398
5fe84a5f7035 rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents: 750
diff changeset
    26
    subject = 'CWUser'
744
4da6e0f4df2a test upgrade
sylvain.thenault@logilab.fr
parents:
diff changeset
    27
    object = 'Note'