-
Notifications
You must be signed in to change notification settings - Fork 27
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.user
giveaminute.idea
giveaminute.keywords
giveaminute.location
giveaminute.messaging
giveaminute.metrics
giveaminute.project
giveaminute.projectResource
The primary table for user data is user
.
Attributes:
db
- A
web.db.DB
instance. CBU uses a MySQL database, so this is specifically aweb.db.MySQLDB
instance. It is created with theweb.db.database
factory 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_key
field from the table email
- The
email
field from the table firstName
- The
first_name
field from the table lastName
- The
last_name
field from the table imageId
- The
image_id
field from the table locationId
- The
location_id
field from the table location
- The
location_name
field from the table description
- The
description
field from the table affiliation
- The
affiliation
field from the table groupMembershipBitmask
- The
group_membership_bitmask
field from the table emailNotification
- The
email_notification
field 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