# apps/participants/models.py
from django.db import models
from apps.core.models import TimeStampedModel

class Participant(TimeStampedModel):
    group_name = models.CharField(max_length=80, unique=True)

    # diffs en porcentaje
    R_diff  = models.FloatField()
    L_diff  = models.FloatField()
    Ph_diff = models.FloatField()
    Pcu_diff= models.FloatField()

    s_vol_over_eta = models.FloatField(help_text="S*Vol/η")  # métrica objetiva
    score = models.FloatField(default=0)

    class Meta:
        ordering = ["-score"]

    def __str__(self):
        return self.group_name
