2015-06-10 18:39:42 +00:00
|
|
|
import json
|
|
|
|
|
|
|
|
__author__ = 'Aran'
|
|
|
|
from google.appengine.ext import db
|
|
|
|
|
|
|
|
class Project(db.Model):
|
|
|
|
projectName = db.StringProperty(required=True)
|
2015-06-15 13:32:35 +00:00
|
|
|
master_id = db.IntegerProperty(required=True)
|
2015-06-14 22:35:18 +00:00
|
|
|
grade = db.IntegerProperty(required=True, default=0)
|
|
|
|
logo_url = db.StringProperty(required=False)
|
2015-06-10 18:39:42 +00:00
|
|
|
gitRepository = db.StringProperty(required=True)
|
|
|
|
membersId = db.StringListProperty(required=True)
|
|
|
|
|
|
|
|
def to_JSON(self):
|
|
|
|
data = {'projectName' : self.projectName,
|
2015-06-15 13:32:35 +00:00
|
|
|
'master_id' : self.master_id,
|
2015-06-10 18:39:42 +00:00
|
|
|
'grade' : self.grade,
|
|
|
|
'logo_url' : self.logo_url,
|
|
|
|
'gitRepository' : self.gitRepository,
|
|
|
|
'membersId' : self.membersId,
|
|
|
|
}
|
|
|
|
return json.dumps(data)
|