enum types fkr

This commit is contained in:
Corban-Lee Jones 2024-11-11 22:46:41 +00:00
parent 32032f4f9e
commit 545d05ece8

View File

@ -41,13 +41,18 @@ class AnglerGroup(models.Model):
name = models.CharField(max_length=128)
anglers = models.ManyToManyField(to=Angler)
TYPES = (
(0, "Set"), # Collection of commonly used anglers to aide in their selection for a match or league.
(1, "Team"), # Collection of anglers that acts as a single competing unit in a match or league.
(2, "Pair") # Two anglers that acts as a single competing unit in a match or league.
)
class Types:
SET = 0 # Collection of commonly used anglers to aide in their selection for a match or league.
TEAM = 1 # Collection of anglers that acts as a single competing unit in a match or league.
PAIR = 2 # Two anglers that acts as a single competing unit in a match or league.
type = models.PositiveSmallIntegerField(choices=TYPES)
type = models.PositiveSmallIntegerField(
choices=(
(Types.SET, "Set"),
(Types.TEAM, "Team"),
(Types.PAIR, "Pair")
)
)
class Meta:
verbose_name = "angler group"