예제 #1
0
class Ideas(db.DynamicDocument):
    updated_date = db.DateTimeField(default=datetime.datetime.now,
                                    required=True)
    likes = db.BooleanField(default=False)
    innovation_doc = db.ListField(db.StringField(max_length=30))
    id = db.IntField(required=True)
    relevance_to_challenge = db.StringField(required=True)
    title = db.StringField(required=True)
    who_locked = db.ListField(db.StringField(max_length=30))
    innovators = db.ListField(db.EmbeddedDocumentField('Innovator'))
    status = db.StringField(required=True)
    description = db.StringField(required=True)
    tags = db.StringField(required=True)
    idea_history = db.StringField(required=True)
    status_date = db.DateTimeField(default=datetime.datetime.now,
                                   required=True)
    from_combined = db.BooleanField(default=False)
    contest_id = db.IntField(required=True)
    disposition = db.StringField(required=True)
    practical_problem_solved = db.StringField(required=True)
    likes_count = db.IntField(required=True)
    locked = db.StringField(required=True)
    sends_count = db.IntField(required=True)
    submit_date = db.DateTimeField(default=datetime.datetime.now,
                                   required=True)
    type_of_innovation = db.StringField(required=True)
    success_benefit = db.StringField(required=True)
    comments_count = db.IntField(required=True)
    submitter = db.EmailField(max_length=255, required=True)
예제 #2
0
class UserProfile(db.DynamicDocument):
    email = db.EmailField(max_length=255, required=True)
    badgeid = db.StringField(max_length=255, required=True)
    password = db.StringField(max_length=255, required=True)
    name = db.StringField(max_length=255, required=True)
    keyword = db.ListField(db.StringField(max_length=30))
    doc = db.ListField(db.IntField())
    created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
    active = db.BooleanField(default=True)

    meta = {'indexes': [{'fields': ['email'], 'unique': True}]}
예제 #3
0
class UserPost(db.DynamicDocument):
    created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
    docid = db.IntField(required=True)
    avgrate = db.IntField(required=True)
    comments = db.ListField(db.EmbeddedDocumentField('Comment'))
    rate = db.ListField(db.EmbeddedDocumentField('Rate'))
    slug = db.StringField(max_length=255, required=True)

    def get_absolute_url(self):
        return url_for('post', kwargs={"slug": self.slug})

    @property
    def post_type(self):
        return self.__class__.__name__

    meta = {
        'allow_inheritance': True,
        'indexes': [{
            'fields': ['docid'],
            'unique': True
        }],
        'ordering': ['docid']
    }
예제 #4
0
class DocTag(db.DynamicDocument):
    docid = db.IntField(required=True)
    tags = db.ListField(db.StringField(max_length=255))
예제 #5
0
class LambdaWT(db.DynamicDocument):
    wordid = db.IntField(required=True)
    lam = db.ListField(db.FloatField(required=True))
예제 #6
0
class LambdaTW(db.DynamicDocument):
    topicid = db.IntField(required=True)
    lam = db.ListField(db.FloatField(required=True))
예제 #7
0
class DocSim(db.DynamicDocument):
    docid = db.IntField(required=True)
    similarity = db.ListField(db.EmbeddedDocumentField('Similarity'))
예제 #8
0
class GammaTD(db.DynamicDocument):
    topicid = db.IntField(required=True)
    gam = db.ListField(db.EmbeddedDocumentField('DocGamma'))
예제 #9
0
class GammaDT(db.DynamicDocument):
    docid = db.IntField(required=True)
    gamma = db.ListField(db.FloatField(required=True))
예제 #10
0
class TagDoc(db.DynamicDocument):
    tag = db.StringField(max_length=255)
    docid = db.ListField(db.IntField(required=True))