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)
|
||||
|
||||
TYPES = (
|
||||
(0, "team type 1"), # TODO: Change these placeholders for actual values.
|
||||
(1, "team type 2"),
|
||||
(2, "team type 3")
|
||||
(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.
|
||||
)
|
||||
|
||||
type = models.PositiveSmallIntegerField(choices=TYPES)
|
||||
@ -241,16 +241,17 @@ class Match(models.Model):
|
||||
draw_datetime = models.DateTimeField()
|
||||
|
||||
TYPES = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
(0, "Club Match"),
|
||||
(1, "Open Match"),
|
||||
(2, "Majors")
|
||||
)
|
||||
type = models.PositiveSmallIntegerField(choices=TYPES)
|
||||
|
||||
# TODO: this might be wrong, maybe should inherit value from related league or league rules
|
||||
COMPETITOR_TYPES = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
(0, "Individuals"),
|
||||
(1, "Pairs"),
|
||||
(2, "Teams")
|
||||
)
|
||||
competitor_type = models.PositiveSmallIntegerField(choices=COMPETITOR_TYPES)
|
||||
|
||||
@ -272,7 +273,7 @@ class LeagueRule(models.Model):
|
||||
id (int): Automatically incrementing identifier number.
|
||||
name (str): A human-readable label to identify this item.
|
||||
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
|
||||
place_secondly_by_weight (bool): TODO
|
||||
team_places_secondly_by_section (bool): TODO
|
||||
@ -296,67 +297,85 @@ class LeagueRule(models.Model):
|
||||
name = models.CharField(max_length=128)
|
||||
|
||||
RANKING_SYSTEMS = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
(0, "By Points"),
|
||||
(1, "By Weight")
|
||||
)
|
||||
ranking_system = models.PositiveSmallIntegerField(choices=RANKING_SYSTEMS)
|
||||
|
||||
POINTS_ALLOCATIONS = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
(0, "First Place Low"),
|
||||
(1, "First Place High")
|
||||
)
|
||||
points_allocation = models.PositiveSmallIntegerField(choices=POINTS_ALLOCATIONS)
|
||||
|
||||
POINTS_AWARDED = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
(0, "Per Section"),
|
||||
(1, "Per Zone"), # TODO: what is a zone?
|
||||
(2, "Per Match")
|
||||
)
|
||||
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()
|
||||
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 = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
(0, "Threshold Points"), # TODO: waiting on description
|
||||
(1, "Worst Place Points"), # The points given for a DNW are equal to the points of last place
|
||||
(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_value = models.IntegerField()
|
||||
|
||||
LEFT_EARLYS = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
)
|
||||
# Same as DNW, except is invoked because the angler left before the match end.
|
||||
LEFT_EARLYS = DID_NOT_WEIGHS
|
||||
left_early = models.PositiveSmallIntegerField(choices=LEFT_EARLYS)
|
||||
left_early_value = models.IntegerField()
|
||||
|
||||
DID_NOT_BOOKS = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
# Same as DNW, except invoked for not showing up.
|
||||
# This is used to balance teams who are missing players.
|
||||
NO_SHOWS = (
|
||||
(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.IntegerField()
|
||||
|
||||
DISQUALIFICATIONS = (
|
||||
(0, "choice 1"),
|
||||
(1, "choice 2"),
|
||||
(2, "choice 3")
|
||||
)
|
||||
# Same as DNW, except invoked when an angler is disqualified.
|
||||
DISQUALIFICATIONS = DID_NOT_WEIGHS
|
||||
disqualification = models.PositiveSmallIntegerField(choices=DISQUALIFICATIONS)
|
||||
disqualification_value = models.IntegerField()
|
||||
|
||||
best_league_sessions = models.IntegerField()
|
||||
worst_league_sessions = models.IntegerField()
|
||||
match_placed_positions = models.IntegerField()
|
||||
# TODO
|
||||
best_league_sessions = models.IntegerField() # max: 20, min: 0
|
||||
worst_league_sessions = models.IntegerField() # max: 20, min: 0
|
||||
match_placed_positions = models.IntegerField() # max: 200, min: 0
|
||||
|
||||
class Meta:
|
||||
verbose_name = "league rule"
|
||||
|
Loading…
x
Reference in New Issue
Block a user