f3-data-models 0.5.15__tar.gz → 0.5.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {f3_data_models-0.5.15 → f3_data_models-0.5.16}/PKG-INFO +1 -1
- {f3_data_models-0.5.15 → f3_data_models-0.5.16}/f3_data_models/models.py +47 -4
- {f3_data_models-0.5.15 → f3_data_models-0.5.16}/pyproject.toml +1 -1
- {f3_data_models-0.5.15 → f3_data_models-0.5.16}/README.md +0 -0
- {f3_data_models-0.5.15 → f3_data_models-0.5.16}/f3_data_models/__init__.py +0 -0
- {f3_data_models-0.5.15 → f3_data_models-0.5.16}/f3_data_models/testing.py +0 -0
- {f3_data_models-0.5.15 → f3_data_models-0.5.16}/f3_data_models/utils.py +0 -0
@@ -136,6 +136,38 @@ class Event_Cadence(enum.Enum):
|
|
136
136
|
monthly = 2
|
137
137
|
|
138
138
|
|
139
|
+
class Achievement_Cadence(enum.Enum):
|
140
|
+
"""
|
141
|
+
Enum representing the cadence of an achievement.
|
142
|
+
|
143
|
+
Attributes:
|
144
|
+
weekly
|
145
|
+
monthly
|
146
|
+
quarterly
|
147
|
+
yearly
|
148
|
+
lifetime
|
149
|
+
"""
|
150
|
+
|
151
|
+
weekly = 1
|
152
|
+
monthly = 2
|
153
|
+
quarterly = 3
|
154
|
+
yearly = 4
|
155
|
+
lifetime = 5
|
156
|
+
|
157
|
+
|
158
|
+
class Achievement_Threshold_Type(enum.Enum):
|
159
|
+
"""
|
160
|
+
Enum representing the type of threshold for an achievement.
|
161
|
+
|
162
|
+
Attributes:
|
163
|
+
posts
|
164
|
+
unique_aos
|
165
|
+
"""
|
166
|
+
|
167
|
+
posts = 1
|
168
|
+
unique_aos = 2
|
169
|
+
|
170
|
+
|
139
171
|
class Org_Type(enum.Enum):
|
140
172
|
"""
|
141
173
|
Enum representing the type of organization.
|
@@ -957,7 +989,7 @@ class SlackUser(Base):
|
|
957
989
|
strava_expires_at (Optional[datetime]): The expiration time of the Strava token.
|
958
990
|
strava_athlete_id (Optional[int]): The Strava athlete ID of the user.
|
959
991
|
meta (Optional[Dict[str, Any]]): Additional metadata for the Slack user.
|
960
|
-
slack_updated (Optional[
|
992
|
+
slack_updated (Optional[int]): The last update time of the Slack user.
|
961
993
|
created (datetime): The timestamp when the record was created.
|
962
994
|
updated (datetime): The timestamp when the record was last updated.
|
963
995
|
""" # noqa: E501
|
@@ -979,7 +1011,7 @@ class SlackUser(Base):
|
|
979
1011
|
strava_expires_at: Mapped[Optional[datetime]]
|
980
1012
|
strava_athlete_id: Mapped[Optional[int]]
|
981
1013
|
meta: Mapped[Optional[Dict[str, Any]]]
|
982
|
-
slack_updated: Mapped[Optional[
|
1014
|
+
slack_updated: Mapped[Optional[int]]
|
983
1015
|
created: Mapped[dt_create]
|
984
1016
|
updated: Mapped[dt_update]
|
985
1017
|
|
@@ -1044,9 +1076,14 @@ class Achievement(Base):
|
|
1044
1076
|
id (int): Primary Key of the model.
|
1045
1077
|
name (str): The name of the achievement.
|
1046
1078
|
description (Optional[str]): A description of the achievement.
|
1047
|
-
verb (str): The verb associated with the achievement.
|
1048
1079
|
image_url (Optional[str]): The URL of the achievement's image.
|
1049
1080
|
specific_org_id (Optional[int]): The ID of the specific region if a custom achievement. If null, the achievement is available to all regions.
|
1081
|
+
is_active (bool): Whether the achievement is active. Default is True.
|
1082
|
+
auto_award (bool): Whether the achievement is automatically awarded or needs to be manually tagged. Default is False.
|
1083
|
+
auto_cadence (Optional[Achievement_Cadence]): The cadence for automatic awarding of the achievement.
|
1084
|
+
auto_threshold (Optional[int]): The threshold for automatic awarding of the achievement.
|
1085
|
+
auto_threshold_type (Optional[Achievement_Threshold_Type]): The type of threshold for automatic awarding of the achievement ('posts', 'unique_aos', etc.).
|
1086
|
+
auto_filters (Optional[Dict[str, Any]]): Event filters for automatic awarding of the achievement. Should be a format like {'include': [{'event_type_id': [1, 2]}, {'event_tag_id': [3]}], 'exclude': [{'event_category': ['third_f']}]}.
|
1050
1087
|
created (datetime): The timestamp when the record was created.
|
1051
1088
|
updated (datetime): The timestamp when the record was last updated.
|
1052
1089
|
""" # noqa: E501
|
@@ -1056,9 +1093,15 @@ class Achievement(Base):
|
|
1056
1093
|
id: Mapped[intpk]
|
1057
1094
|
name: Mapped[str]
|
1058
1095
|
description: Mapped[Optional[str]]
|
1059
|
-
verb: Mapped[str]
|
1060
1096
|
image_url: Mapped[Optional[str]]
|
1061
1097
|
specific_org_id: Mapped[Optional[int]] = mapped_column(ForeignKey("orgs.id"))
|
1098
|
+
is_active: Mapped[bool] = mapped_column(Boolean, server_default="true", nullable=False)
|
1099
|
+
auto_award: Mapped[bool] = mapped_column(Boolean, server_default="false", nullable=False)
|
1100
|
+
auto_cadence: Mapped[Optional[Achievement_Cadence]]
|
1101
|
+
auto_threshold_type: Mapped[Optional[Achievement_Threshold_Type]]
|
1102
|
+
auto_threshold: Mapped[Optional[int]]
|
1103
|
+
auto_filters: Mapped[Optional[Dict[str, Any]]] = mapped_column(JSON, default=dict)
|
1104
|
+
meta: Mapped[Optional[Dict[str, Any]]] = mapped_column(JSON, default=dict)
|
1062
1105
|
created: Mapped[dt_create]
|
1063
1106
|
updated: Mapped[dt_update]
|
1064
1107
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|