Beispiel #1
0
class Books(db.Document):
    b_id = db.IntField(required=True, unique=True)
    author = db.StringField(required=True)
    country = db.StringField(required=True)
    imageLink = db.StringField(required=True)
    language = db.StringField(required=True)
    link = db.StringField(required=True)
    pages = db.IntField(required=True)
    title = db.StringField(required=True)
    year = db.IntField(required=True)
Beispiel #2
0
class Students(db.Document):
    name = db.StringField(required=True)
    s_id = db.IntField(required=True, unique=True)
    course = db.StringField(required=True)
    program = db.StringField(required=True)
    batch = db.StringField(required=True)
    college = db.StringField(required=True)
Beispiel #3
0
class Task(db.DynamicDocument):
    """Task collection model"""
    text = db.StringField(required=True)
    done = db.BooleanField(required=True)
    weight = db.IntField(requrired=True)
    status = db.StringField()
    projectId = db.StringField()
    deleted = db.BooleanField()

    meta = {'collection': 'tasks'}
Beispiel #4
0
class ResetPasswordCode(db.Document):
    code = db.IntField()
    user_mail = db.StringField()
    expire_at = db.DateTimeField()
    meta = {
        'indexes': [{
            'fields': ['expire_at'],
            'expireAfterSeconds': 0
        }  # ttl
                    ]
    }
Beispiel #5
0
class Movie(db.Document):
    name = db.StringField(required=True, unique=True)
    ano = db.IntField(require=True, unique=True)
    genero = db.ListField(db.StringField(), required=True)
Beispiel #6
0
class Holiday(db.Document):
    year = db.IntField(required=True)
    month = db.IntField(required=True)
    day = db.IntField(required=True)
    des = db.StringField(required=False)
class VideoInfo(db.Document):
    video_id = db.IntField(required=True, primary_key=True)
    comments = db.ListField(db.EmbeddedDocumentField(Comment), required=False)
    likes = db.ListField(db.IntField(), required=False)
Beispiel #8
0
class Video(db.Document):
    name = db.StringField(required=True, unique=False)
    theme = db.StringField(required=True, unique=False)
    like = db.IntField(required=False, unique=False, default=0)
    dislike = db.IntField(required=False, unique=False, default=0)
class UserStat(db.Document):
    id = db.SequenceField(primary_key=True)
    num_users = db.IntField(required=True)
    timestamp = db.StringField(required=True)
Beispiel #10
0
class Comment(db.EmbeddedDocument):
    author = db.StringField(required=True)
    comment_id = db.SequenceField(primary_key=True)
    user_id = db.IntField(required=True)
    content = db.StringField(required=True)
    timestamp = db.StringField(required=True)
Beispiel #11
0
class Friends(db.Document):
    user_id = db.IntField(primary_key=True)
    friends = db.ListField(db.IntField(), required=False)
class PendingRequest(db.Document):
    user_id = db.IntField(primary_key=True)
    requests = db.ListField(db.IntField(), required=False)