from django.db import models class LabSSHServer(models.Model): class Status(models.TextChoices): HEALTHY = "healthy" UNHEALTHY = "unhealthy" domain = models.CharField(max_length=255, unique=True) regions = models.JSONField(default=list) score = models.IntegerField(default=0) active_session = models.IntegerField(default=0) last_report_at = models.DateTimeField(blank=True, null=True) status = models.CharField( max_length=20, choices=Status.choices, default=Status.HEALTHY ) last_unhealthy_at = models.DateTimeField(blank=True, null=True) healthy_success_streak = models.IntegerField(default=0) created_at = models.DateTimeField(auto_now_add=True) class Meta: db_table = "lab_ssh_servers"