Ejemplo n.º 1
0
class EmbeddedModuleModal(db.EmbeddedDocument):
    _id = db.ObjectIdField()
    module_name = db.StringField()
    order = db.IntField(unique_with='module_name')
    sub_modules = db.SortedListField(db.EmbeddedDocumentField(SubModule),
                                     ordering="sub_order",
                                     reverse=False)
Ejemplo n.º 2
0
class ProjectModel(db.Document):
    _id = db.ObjectIdField()
    project_id = db.IntField()
    title = db.StringField()
    text = db.StringField()
    test = db.StringField()
    meta = {"collection": "project", "strict": "False"}
Ejemplo n.º 3
0
class ModuleModel(db.Document):
    _id = db.ObjectIdField()
    module_name = db.StringField()
    order = db.IntField(unique_with='module_name')
    sub_modules = db.SortedListField(db.EmbeddedDocumentField(SubModule),
                                     ordering="sub_order",
                                     reverse=False)
    meta = {"collection": "module", "strict": "False", 'ordering': ['-order']}
Ejemplo n.º 4
0
class CourseModel(db.Document):
    _id = db.ObjectIdField()
    course_id = db.IntField()
    title = db.StringField()
    text = db.StringField()
    goal = db.StringField()
    frame_head = db.StringField()
    frame_foot = db.StringField()
    code = db.StringField()
    concept = db.SortedListField(
        db.ReferenceField(Concept, reverse_delete_rule=PULL))
    meta = {"collection": "course", "strict": "False"}
Ejemplo n.º 5
0
class Unit(db.EmbeddedDocument):
    unit_id = db.ObjectIdField()
    unit_title = db.StringField()
    unit_order = db.IntField()
    unit_type = db.StringField()
Ejemplo n.º 6
0
class SubModule(db.EmbeddedDocument):
    sub_id = db.ObjectIdField()
    sub_order = db.IntField()
    type = db.StringField()