mfss-positioning/app/apps/cam/models/model_channel.py
zakhy 58fabdce11 Зачин модуля
#TODO - перенос на CBV.
2025-03-07 09:37:15 +07:00

23 lines
703 B
Python

from django.db import models
class Channel(models.Model):
title = models.CharField(max_length=255)
guid = models.CharField(max_length=50, unique=True)
codec = models.CharField(max_length=50, default="h264")
have_mainstream = models.BooleanField(default=False)
have_substream = models.BooleanField(default=False)
active = models.BooleanField(default=True)
def __str__(self) -> str:
return self.title
class Meta:
verbose_name = "камера"
verbose_name_plural = "камеры"
indexes = [
models.Index(fields=("title",)),
models.Index(fields=("guid",)),
models.Index(fields=("active",)),
]