16 |
16 |
17 """This module contains the Reviewer Model.""" |
17 """This module contains the Reviewer Model.""" |
18 |
18 |
19 __authors__ = [ |
19 __authors__ = [ |
20 '"Todd Larsen" <tlarsen@google.com>', |
20 '"Todd Larsen" <tlarsen@google.com>', |
21 '"Sverre Rabbelier" <sverre@rabbelier.nl>', |
|
22 ] |
21 ] |
|
22 |
23 |
23 |
24 from google.appengine.ext import db |
24 from google.appengine.ext import db |
25 |
25 |
26 from soc import models |
26 import soc.models.role |
27 import soc.models.author |
27 import soc.models.organization |
28 |
28 |
29 |
29 |
30 class Reviewer(db.Model): |
30 class Reviewer(soc.models.role.Role): |
31 """Reviewer details for a specific Program. |
31 """Reviewer details for a specific Program. |
32 |
32 |
33 A Reviewer entity participates in the following relationships implemented |
33 A Reviewer entity participates in the following relationships implemented |
34 as a db.ReferenceProperty elsewhere in another db.Model: |
34 as a db.ReferenceProperty elsewhere in another db.Model: |
35 |
35 |
36 reviews) an optional 1:many relationship of Reviews written by the |
36 reviews) an optional 1:many relationship of Reviews written by the |
37 Reviewer. This relation is implemented as the 'reviews' |
37 Reviewer. This relation is implemented as the 'reviews' |
38 back-reference Query of the Review model 'reviewer' reference. |
38 back-reference Query of the Review model 'reviewer' reference. |
39 """ |
39 """ |
40 |
|
41 #: A 1:1 relationship associating a Contributor with Person |
|
42 #: details and capabilities. The back-reference in the Person model |
|
43 #: is a Query named 'reviewer'. |
|
44 person = db.ReferenceProperty(reference_class=models.person.Person, |
|
45 required=True, collection_name="reviewer") |
|
46 |
40 |
|
41 #: A many:1 relationship associating Reviewers with specific Organization |
|
42 #: details and capabilities. The back-reference in the Organization model |
|
43 #: is a Query named 'reviewers'. |
|
44 org = db.ReferenceProperty( |
|
45 reference_class=soc.models.organization.Organization, |
|
46 required=True, collection_name='reviewers') |
|
47 |