documenting and missing options
This commit is contained in:
parent
cc31d447b8
commit
8d3b20e971
@ -42,9 +42,9 @@ class AnglerGroup(models.Model):
|
|||||||
anglers = models.ManyToManyField(to=Angler)
|
anglers = models.ManyToManyField(to=Angler)
|
||||||
|
|
||||||
TYPES = (
|
TYPES = (
|
||||||
(0, "team type 1"), # TODO: Change these placeholders for actual values.
|
(0, "Set"), # Collection of commonly used anglers to aide in their selection for a match or league.
|
||||||
(1, "team type 2"),
|
(1, "Team"), # Collection of anglers that acts as a single competing unit in a match or league.
|
||||||
(2, "team type 3")
|
(2, "Pair") # Two anglers that acts as a single competing unit in a match or league.
|
||||||
)
|
)
|
||||||
|
|
||||||
type = models.PositiveSmallIntegerField(choices=TYPES)
|
type = models.PositiveSmallIntegerField(choices=TYPES)
|
||||||
@ -241,16 +241,17 @@ class Match(models.Model):
|
|||||||
draw_datetime = models.DateTimeField()
|
draw_datetime = models.DateTimeField()
|
||||||
|
|
||||||
TYPES = (
|
TYPES = (
|
||||||
(0, "choice 1"),
|
(0, "Club Match"),
|
||||||
(1, "choice 2"),
|
(1, "Open Match"),
|
||||||
(2, "choice 3")
|
(2, "Majors")
|
||||||
)
|
)
|
||||||
type = models.PositiveSmallIntegerField(choices=TYPES)
|
type = models.PositiveSmallIntegerField(choices=TYPES)
|
||||||
|
|
||||||
|
# TODO: this might be wrong, maybe should inherit value from related league or league rules
|
||||||
COMPETITOR_TYPES = (
|
COMPETITOR_TYPES = (
|
||||||
(0, "choice 1"),
|
(0, "Individuals"),
|
||||||
(1, "choice 2"),
|
(1, "Pairs"),
|
||||||
(2, "choice 3")
|
(2, "Teams")
|
||||||
)
|
)
|
||||||
competitor_type = models.PositiveSmallIntegerField(choices=COMPETITOR_TYPES)
|
competitor_type = models.PositiveSmallIntegerField(choices=COMPETITOR_TYPES)
|
||||||
|
|
||||||
@ -272,7 +273,7 @@ class LeagueRule(models.Model):
|
|||||||
id (int): Automatically incrementing identifier number.
|
id (int): Automatically incrementing identifier number.
|
||||||
name (str): A human-readable label to identify this item.
|
name (str): A human-readable label to identify this item.
|
||||||
ranking_system (int): TODO
|
ranking_system (int): TODO
|
||||||
points_allocation (int): TODO
|
points_allocation (int): Whether people win by having the lowest or heighest points.
|
||||||
points_awarded (int): TODO
|
points_awarded (int): TODO
|
||||||
place_secondly_by_weight (bool): TODO
|
place_secondly_by_weight (bool): TODO
|
||||||
team_places_secondly_by_section (bool): TODO
|
team_places_secondly_by_section (bool): TODO
|
||||||
@ -296,67 +297,85 @@ class LeagueRule(models.Model):
|
|||||||
name = models.CharField(max_length=128)
|
name = models.CharField(max_length=128)
|
||||||
|
|
||||||
RANKING_SYSTEMS = (
|
RANKING_SYSTEMS = (
|
||||||
(0, "choice 1"),
|
(0, "By Points"),
|
||||||
(1, "choice 2"),
|
(1, "By Weight")
|
||||||
(2, "choice 3")
|
|
||||||
)
|
)
|
||||||
ranking_system = models.PositiveSmallIntegerField(choices=RANKING_SYSTEMS)
|
ranking_system = models.PositiveSmallIntegerField(choices=RANKING_SYSTEMS)
|
||||||
|
|
||||||
POINTS_ALLOCATIONS = (
|
POINTS_ALLOCATIONS = (
|
||||||
(0, "choice 1"),
|
(0, "First Place Low"),
|
||||||
(1, "choice 2"),
|
(1, "First Place High")
|
||||||
(2, "choice 3")
|
|
||||||
)
|
)
|
||||||
points_allocation = models.PositiveSmallIntegerField(choices=POINTS_ALLOCATIONS)
|
points_allocation = models.PositiveSmallIntegerField(choices=POINTS_ALLOCATIONS)
|
||||||
|
|
||||||
POINTS_AWARDED = (
|
POINTS_AWARDED = (
|
||||||
(0, "choice 1"),
|
(0, "Per Section"),
|
||||||
(1, "choice 2"),
|
(1, "Per Zone"), # TODO: what is a zone?
|
||||||
(2, "choice 3")
|
(2, "Per Match")
|
||||||
)
|
)
|
||||||
points_awarded = models.PositiveSmallIntegerField(choices=POINTS_AWARDED)
|
points_awarded = models.PositiveSmallIntegerField(choices=POINTS_AWARDED)
|
||||||
|
|
||||||
|
# Use fish weight as a fallback for anglers with matching points? Otherwise they get the same placement.
|
||||||
place_secondly_by_weight = models.BooleanField()
|
place_secondly_by_weight = models.BooleanField()
|
||||||
team_places_secondly_by_section = models.BooleanField()
|
|
||||||
section_placed_positions = models.IntegerField()
|
|
||||||
worst_place_limits = models.BooleanField()
|
|
||||||
attendance_points = models.IntegerField()
|
|
||||||
|
|
||||||
|
# False:
|
||||||
|
# people at the end have the same amount of points, they both come first
|
||||||
|
# True:
|
||||||
|
# two people have same number of points, winner is the section with the highest section placement
|
||||||
|
team_places_secondly_by_section = models.BooleanField()
|
||||||
|
|
||||||
|
# The number of awarded placements per section
|
||||||
|
section_placed_positions = models.IntegerField() # max: 200, min: 0
|
||||||
|
|
||||||
|
# TODO: waiting on james to ask kelly for clarification on this.
|
||||||
|
worst_place_limits = models.BooleanField()
|
||||||
|
|
||||||
|
# Number of points adjusted for attending a match:
|
||||||
|
# if points allocation == 0: adjusted = deducted
|
||||||
|
# if points allocation == 1: adjusted = added
|
||||||
|
attendance_points = models.IntegerField() # max: 20, min: 0
|
||||||
|
|
||||||
|
# Impact on points if an angler hasn't weighed his fish
|
||||||
DID_NOT_WEIGHS = (
|
DID_NOT_WEIGHS = (
|
||||||
(0, "choice 1"),
|
(0, "Threshold Points"), # TODO: waiting on description
|
||||||
(1, "choice 2"),
|
(1, "Worst Place Points"), # The points given for a DNW are equal to the points of last place
|
||||||
(2, "choice 3")
|
(2, "Incremental Points") # A fixed number of points added for a DWN
|
||||||
|
(2, "Absolute Points") # A fixed number of points given for a DNW
|
||||||
|
(2, "Not Scored") # Don't count to overall points
|
||||||
)
|
)
|
||||||
did_not_weigh = models.PositiveSmallIntegerField(choices=DID_NOT_WEIGHS)
|
did_not_weigh = models.PositiveSmallIntegerField(choices=DID_NOT_WEIGHS)
|
||||||
did_not_weigh_value = models.IntegerField()
|
did_not_weigh_value = models.IntegerField()
|
||||||
|
|
||||||
LEFT_EARLYS = (
|
# Same as DNW, except is invoked because the angler left before the match end.
|
||||||
(0, "choice 1"),
|
LEFT_EARLYS = DID_NOT_WEIGHS
|
||||||
(1, "choice 2"),
|
|
||||||
(2, "choice 3")
|
|
||||||
)
|
|
||||||
left_early = models.PositiveSmallIntegerField(choices=LEFT_EARLYS)
|
left_early = models.PositiveSmallIntegerField(choices=LEFT_EARLYS)
|
||||||
left_early_value = models.IntegerField()
|
left_early_value = models.IntegerField()
|
||||||
|
|
||||||
DID_NOT_BOOKS = (
|
# Same as DNW, except invoked for not showing up.
|
||||||
(0, "choice 1"),
|
# This is used to balance teams who are missing players.
|
||||||
(1, "choice 2"),
|
NO_SHOWS = (
|
||||||
(2, "choice 3")
|
(0, "Threshold Points"),
|
||||||
|
(1, "Worst Place Points"),
|
||||||
|
(2, "Absolute Points"),
|
||||||
|
(3, "Not Scored")
|
||||||
)
|
)
|
||||||
|
no_show = models.PositiveSmallIntegerField(choices=NO_SHOWS)
|
||||||
|
no_show_value = models.IntegerField()
|
||||||
|
|
||||||
|
# Same as Now Show, except for angler's who didn't book their place
|
||||||
|
DID_NOT_BOOKS = NO_SHOWS
|
||||||
did_not_book = models.PositiveSmallIntegerField(choices=DID_NOT_BOOKS)
|
did_not_book = models.PositiveSmallIntegerField(choices=DID_NOT_BOOKS)
|
||||||
did_not_book = models.IntegerField()
|
did_not_book = models.IntegerField()
|
||||||
|
|
||||||
DISQUALIFICATIONS = (
|
# Same as DNW, except invoked when an angler is disqualified.
|
||||||
(0, "choice 1"),
|
DISQUALIFICATIONS = DID_NOT_WEIGHS
|
||||||
(1, "choice 2"),
|
|
||||||
(2, "choice 3")
|
|
||||||
)
|
|
||||||
disqualification = models.PositiveSmallIntegerField(choices=DISQUALIFICATIONS)
|
disqualification = models.PositiveSmallIntegerField(choices=DISQUALIFICATIONS)
|
||||||
disqualification_value = models.IntegerField()
|
disqualification_value = models.IntegerField()
|
||||||
|
|
||||||
best_league_sessions = models.IntegerField()
|
# TODO
|
||||||
worst_league_sessions = models.IntegerField()
|
best_league_sessions = models.IntegerField() # max: 20, min: 0
|
||||||
match_placed_positions = models.IntegerField()
|
worst_league_sessions = models.IntegerField() # max: 20, min: 0
|
||||||
|
match_placed_positions = models.IntegerField() # max: 200, min: 0
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "league rule"
|
verbose_name = "league rule"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user