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, SubjectRelation, String, make_type |
19 from yams.buildobjs import EntityType, SubjectRelation, String, make_type |
20 BabarTestType = make_type('BabarTestType') |
20 BabarTestType = make_type('BabarTestType') |
21 |
21 |
|
22 |
22 class Affaire(EntityType): |
23 class Affaire(EntityType): |
23 nom = String(unique=True, maxsize=64) |
24 nom = String(unique=True, maxsize=64) |
|
25 |
24 |
26 |
25 class Personne(EntityType): |
27 class Personne(EntityType): |
26 __unique_together__ = [('nom', 'prenom', 'inline2')] |
28 __unique_together__ = [('nom', 'prenom', 'inline2')] |
27 nom = String(fulltextindexed=True, required=True, maxsize=64) |
29 nom = String(fulltextindexed=True, required=True, maxsize=64) |
28 prenom = String(fulltextindexed=True, maxsize=64) |
30 prenom = String(fulltextindexed=True, maxsize=64) |