blob: b5d9cc5cf14852a712c0568cca72273dedcc67b2 [file] [log] [blame]
#summary Work entity model
#labels Phase-Design,Contents-Skeleton,Design-Model
_*Eventually, this topic should be populated by the output of*_ `pydoc`.
{{{
class Work(db.Model):
"""Model of a Work created by one or more Authors.
Work is a "base entity" of other more specific "works" created by "authors".
A Work entity participates in a number of relationships:
proposal), survey), documentation)
a 1:1 relationship with each entity containing a more specific type of
"work". These relationships are represented explicitly in the other
"work" models by a db.ReferenceProperty named 'work'. The collection_name
argument to db.ReferenceProperty should be set to the singular of the
entity model name of the other "work" class. The above relationship
names correspond, respectively to these Models:
Proposal, Survey, Documentation
authors) a many:many relationship with Authors, stored in a separate
WorksAuthors model. See the WorksAuthors model class for details.
reviews) a 1:many relationship between a Work and the zero or more
Reviews of that Work. This relation is implemented as the 'reviews'
back-reference Query of the Review model 'reviewed' reference.
title: required db.StringProperty indicating the "title" of the work,
which may have different uses depending on the specific type of the work.
Works can be indexed, filtered, and sorted by 'title'.
abstract: db.TextProperty used for different purposes, depending on the
specific type of the work.
"""
title = db.StringProperty(required=True)
abstract = db.TextProperty()
}}}
----
_Copyright 2008 Google Inc._
_This work is licensed under a_
[http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-attribution-2_5.html Creative Commons Attribution 2.5 License].
[http://creativecommons.org/licenses/by/2.5/ http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-2_5-88x31.png]