Create a generic datastructure for audio content planning
We would like to build a simple and generic datamodel for planning the structure of audio content. We found that any audio content may be represented as a sequence of items. There may be branches in the future ("use this branch for today and that one for tomorrow") but we wouldn't want to include this now. As sequences may be constructed in different contexts (e.g. episode and report) they may as well be nested.
If we represent the data as a linked list, this could lead to something like the following:
class AudioContentSequenceItem:
# linked list: a pointer to the next item of the sequence
next_item = ForeignKey("AudioContentSequenceItem")
# an item must contain data for at least one of the following fields
# it may contain data in all of them
# internal note: any meta information which might be helpful
# e.g. "Play title `Probiers mal mit Gemütlichkeit'"
internal_note = TextField()
# speaker's text
speakers_text = TextField()
# audiofile: either containing
# - a (complex) contribution or even a whole episode or
# - just the spoken "moderation" text
audiofile = ForeignKey("Audiofile")
# nested sequence: a nested sequence which should be used at this point
nested_sequence = ForeignKey("AudioContentSequenceItem")
This is very basic but may probably work for many cases. It is a starting point and may be refined when needs arise.
Models like Episode
(as long as it exists) and RadioReport
maintain a pointer to "their" sequence. We will construct an editor for sequences.
This issue only discusses the core model to construct. Migration of existing data is subject to #268 (closed).