diff --git a/apis_ontology/migrations/0044_expression_notes.py b/apis_ontology/migrations/0044_expression_notes.py new file mode 100644 index 0000000..6749f39 --- /dev/null +++ b/apis_ontology/migrations/0044_expression_notes.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.11 on 2024-03-25 08:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("apis_ontology", "0043_rename_first_name_character_forename_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="expression", + name="notes", + field=models.TextField( + blank=True, + default="", + help_text="Feld für interne Notizen", + max_length=1024, + verbose_name="Notiz", + ), + ), + ] diff --git a/apis_ontology/models.py b/apis_ontology/models.py index 9f8c7e9..9d844cc 100644 --- a/apis_ontology/models.py +++ b/apis_ontology/models.py @@ -35,6 +35,23 @@ class Meta: verbose_name_plural = _("progress states") +class NotesMixin(models.Model): + """ + Mixin for internal notes. + """ + + notes = models.TextField( + max_length=1024, + blank=True, + default="", + verbose_name=_("Notiz"), + help_text=_("Feld für interne Notizen"), + ) + + class Meta: + abstract = True + + @reversion.register class AlternativeNameMixin(models.Model): """ @@ -490,7 +507,9 @@ class Meta: @reversion.register(follow=["rootobject_ptr"]) -class Expression(TitlesMixin, DescriptionMixin, StatusMixin, AbstractEntity): +class Expression( + TitlesMixin, DescriptionMixin, NotesMixin, StatusMixin, AbstractEntity +): """ A concrete representation of a given Work, captured in signs, images, audio signals,...