sol.models.club
-- Clubs¶
- class sol.models.club.Club(**kwargs)¶
A club, which organizes championships of tourneys.
- classmethod check_insert(session: Session, fields: dict[str, Any], user_id: str | int) None ¶
Check description validity.
- check_update(fields: dict[str, Any], user_id: str | int) None ¶
Check description validity.
- countChampionships()¶
Return the number of championships organized by this club.
- countPlayers()¶
Return the number of players associated to this club.
- serialize(serializer: Serializer) SerializedClub ¶
Reduce a single club to a simple dictionary.
- Parameters:
serializer -- a
Serializer
instance- Return type:
dict
- Returns:
a plain dictionary containing a flatified view of this club
- championships: Mapped[list[Championship]]¶
Championships
organized by this club.
- property country¶
The name of the club's country.
- couplings: Mapped[str | None]¶
Kind of pairing method used to build next round, used as default value for the corresponding field when creating a new championship.
- description: Mapped[str]¶
Description of the club.
- email: Mapped[str | None]¶
Email address of the club.
- emblem: Mapped[str | None]¶
Logo of the club, used on badges.
This is just the filename, referencing a picture inside the
sol.emblems_dir
directory.
- idclub: Mapped[int]¶
Primary key.
- idrating: Mapped[int | None]¶
Possible
rating
ID, used as default value for the corresponding field when creating a new championship.
- isfederation: Mapped[bool]¶
Flag indicating whether the club is also a federation.
- modified: Mapped[datetime]¶
Last update timestamp.
- nationality: Mapped[str]¶
ISO country code to compute national rankings.
- prizes: Mapped[str]¶
Kind of prize-giving, used as default value for the corresponding field when creating a new championship.
This is used to determine which method will be used to assign final prizes. It may be:
- asis
means that the final prize is the same as the competitor's points;
- fixed
means the usual way, that is 18 points to the winner, 16 to the second, 14 to the third, 13 to the fourth, …, 1 point to the 16th, 0 points after that;
- fixed40
similar to fixed, but applied to best fourty scores starting from 1000:
1000
900
800
750
700
650
600
550
500
450
400
375
350
325
300
275
250
225
200
175
150
140
130
120
110
100
90
80
70
60
50
40
35
30
25
20
15
10
5
1
- millesimal
is the classic method, that distributes a multiple of 1000/num-of-competitors.
- siteurl: Mapped[str | None]¶
Web site URL.