Skip to content

Instantly share code, notes, and snippets.

@vishnevskiy
Created May 23, 2010 04:21
Show Gist options
  • Save vishnevskiy/410630 to your computer and use it in GitHub Desktop.
Save vishnevskiy/410630 to your computer and use it in GitHub Desktop.
from lib.mongomapper import Document
from lib.db import mongo
class Raid(Document):
"""
_id = ObjectId
event_id = ObjectId
outcome = Integer
participants = List
loot = List
screenshots = List
created_on = DateTime
**variables
"""
db = mongo.dkp
collection = 'raids'
class Event(Document):
"""
_id = ObjectId
name = String
importance = Integer
**variables
"""
db = mongo.dkp
collection = 'events'
class Item(Document):
"""
_id = ObjectId
item_id = ObjectId
name = String
**variables
"""
db = mongo.dkp
collection = 'items'
class Member(Document):
"""
_id = ObjectId
member_id = ObjectId
placeholder = Boolean
attendence = {
days7 = Integer
days30 = Integer
days90 = Integer
lifetime = Integer
}
adjustments = List
wish_list = List
**variables
"""
db = mongo.dkp
collection = 'members'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment