38243-vm/core/models.py
Flatlogic Bot 1dad47dada test
2026-02-06 12:46:15 +00:00

17 lines
639 B
Python

from django.db import models
class ServiceSetting(models.Model):
SERVICE_CHOICES = [
('jellyfin', 'Jellyfin'),
('radarr', 'Radarr'),
('sonarr', 'Sonarr'),
('jellyseerr', 'Jellyseerr'),
]
name = models.CharField(max_length=50, choices=SERVICE_CHOICES, unique=True)
url = models.URLField(help_text="Base URL of the service (e.g., http://192.168.1.100:8096)")
api_key = models.CharField(max_length=255, blank=True, null=True, help_text="API Key or Token for the service")
is_active = models.BooleanField(default=True)
def __str__(self):
return self.get_name_display()