forked from localprojects/Change-By-Us
-
Notifications
You must be signed in to change notification settings - Fork 0
Data Models
mjumbewu edited this page Aug 10, 2011
·
1 revision
To install the schema, see the installation instructions (Mac , Ubuntu).
The code for the object layer over Changy By Us's data is stored in the giveaminute package. It is organized into modules according to the data type.
giveaminute.usergiveaminute.ideagiveaminute.keywordsgiveaminute.locationgiveaminute.messaginggiveaminute.metricsgiveaminute.projectgiveaminute.projectResource
The primary table for user data is user.
Attributes:
db- A
web.db.DBinstance. CBU uses a MySQL database, so this is specifically aweb.db.MySQLDBinstance. It is created with theweb.db.databasefactory inframework.controller. id- The ID of the user instance.
data- The database row corresponding to the user, as a
list. projectData- A set of rows of project data for active projects for which this user is an administrator.
userKey- The
user_keyfield from the table email- The
emailfield from the table firstName- The
first_namefield from the table lastName- The
last_namefield from the table imageId- The
image_idfield from the table locationId- The
location_idfield from the table location- The
location_namefield from the table description- The
descriptionfield from the table affiliation- The
affiliationfield from the table groupMembershipBitmask- The
group_membership_bitmaskfield from the table emailNotification- The
email_notificationfield from the table isAdmin- True if the 2nd-lowest bit in the group membership bitmask is 1; otherwise False
isModerator- True if the 3rd-lowest bit in the group membership bitmask is 1; otherwise False
isLeader- True if the 4th-lowest bit in the group membership bitmask is 1; otherwise False
numMessages- The number of new messages since the last time the user accessed their account page