libretime/api/libretime_api/history/models/played.py

61 lines
1.5 KiB
Python
Raw Permalink Normal View History

2020-01-30 14:47:36 +01:00
from django.db import models
2020-01-30 14:47:36 +01:00
class PlayoutHistory(models.Model):
file = models.ForeignKey(
"storage.File",
on_delete=models.DO_NOTHING,
blank=True,
null=True,
)
2020-01-30 14:47:36 +01:00
starts = models.DateTimeField()
ends = models.DateTimeField(blank=True, null=True)
2021-05-27 16:23:02 +02:00
instance = models.ForeignKey(
"schedule.ShowInstance",
on_delete=models.DO_NOTHING,
blank=True,
null=True,
2021-05-27 16:23:02 +02:00
)
2020-01-30 14:47:36 +01:00
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_playout_history"
2020-01-30 14:47:36 +01:00
class PlayoutHistoryMetadata(models.Model):
history = models.ForeignKey(
"history.PlayoutHistory",
on_delete=models.DO_NOTHING,
)
2020-01-30 14:47:36 +01:00
key = models.CharField(max_length=128)
value = models.CharField(max_length=128)
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_playout_history_metadata"
2020-01-30 14:47:36 +01:00
class PlayoutHistoryTemplate(models.Model):
name = models.CharField(max_length=128)
type = models.CharField(max_length=35)
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_playout_history_template"
2020-01-30 14:47:36 +01:00
class PlayoutHistoryTemplateField(models.Model):
template = models.ForeignKey(
"history.PlayoutHistoryTemplate",
on_delete=models.DO_NOTHING,
)
2020-01-30 14:47:36 +01:00
name = models.CharField(max_length=128)
label = models.CharField(max_length=128)
type = models.CharField(max_length=128)
is_file_md = models.BooleanField()
position = models.IntegerField()
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_playout_history_template_field"