diff --git a/contentcuration/contentcuration/migrations/0136_contentnode_suggested_duration.py b/contentcuration/contentcuration/migrations/0136_contentnode_suggested_duration.py new file mode 100644 index 0000000000..aff7b5641b --- /dev/null +++ b/contentcuration/contentcuration/migrations/0136_contentnode_suggested_duration.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.5 on 2022-03-21 21:40 +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ('contentcuration', '0135_add_metadata_labels'), + ] + + operations = [ + migrations.AddField( + model_name='contentnode', + name='suggested_duration', + field=models.IntegerField(blank=True, help_text='Suggested duration for the content node (in seconds)', null=True), + ), + ] diff --git a/contentcuration/contentcuration/models.py b/contentcuration/contentcuration/models.py index 5aaf1ea364..180db9ce25 100644 --- a/contentcuration/contentcuration/models.py +++ b/contentcuration/contentcuration/models.py @@ -1160,6 +1160,10 @@ class ContentNode(MPTTModel, models.Model): categories = models.JSONField(blank=True, null=True) learner_needs = models.JSONField(blank=True, null=True) + # A field for storing a suggested duration for the content node + # this duration should be in seconds. + suggested_duration = models.IntegerField(blank=True, null=True, help_text="Suggested duration for the content node (in seconds)") + objects = CustomContentNodeTreeManager() # Track all updates and ignore a blacklist of attributes