sintonia/api/libretimeapi/models/playout.py

76 lines
2.0 KiB
Python
Raw Normal View History

2020-01-30 14:47:36 +01:00
from django.db import models
from .files import File
class ListenerCount(models.Model):
2021-05-27 16:23:02 +02:00
timestamp = models.ForeignKey("Timestamp", models.DO_NOTHING)
mount_name = models.ForeignKey("MountName", models.DO_NOTHING)
2020-01-30 14:47:36 +01:00
listener_count = models.IntegerField()
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_listener_count"
2020-01-30 14:47:36 +01:00
class LiveLog(models.Model):
state = models.CharField(max_length=32)
start_time = models.DateTimeField()
end_time = models.DateTimeField(blank=True, null=True)
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_live_log"
2020-01-30 14:47:36 +01:00
class PlayoutHistory(models.Model):
file = models.ForeignKey(File, models.DO_NOTHING, blank=True, null=True)
starts = models.DateTimeField()
ends = models.DateTimeField(blank=True, null=True)
2021-05-27 16:23:02 +02:00
instance = models.ForeignKey(
"ShowInstance", models.DO_NOTHING, blank=True, null=True
)
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(PlayoutHistory, models.DO_NOTHING)
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(PlayoutHistoryTemplate, models.DO_NOTHING)
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"
2020-01-30 14:47:36 +01:00
class Timestamp(models.Model):
timestamp = models.DateTimeField()
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_timestamp"