models.py 729 Bytes
Newer Older
Carson Gee committed
1 2 3
"""Models for dashboard application"""

import mongoengine
4
from xmodule.modulestore.mongoengine_fields import CourseKeyField
Carson Gee committed
5 6 7 8


class CourseImportLog(mongoengine.Document):
    """Mongoengine model for git log"""
9
    # pylint: disable=incomplete-protocol
Carson Gee committed
10

11 12
    course_id = CourseKeyField(max_length=128)
    # NOTE: this location is not a Location object but a pathname
Carson Gee committed
13 14 15 16 17 18 19
    location = mongoengine.StringField(max_length=168)
    import_log = mongoengine.StringField(max_length=20 * 65535)
    git_log = mongoengine.StringField(max_length=65535)
    repo_dir = mongoengine.StringField(max_length=128)
    created = mongoengine.DateTimeField()
    meta = {'indexes': ['course_id', 'created'],
            'allow_inheritance': False}