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

import mongoengine
4

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


class CourseImportLog(mongoengine.Document):
    """Mongoengine model for git log"""
10 11
    course_id = CourseKeyField(max_length=128)
    # NOTE: this location is not a Location object but a pathname
Carson Gee committed
12 13 14 15 16 17 18
    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}