f3-data-models 0.3.0__tar.gz → 0.3.1__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.3.0 → f3_data_models-0.3.1}/PKG-INFO +1 -1
- {f3_data_models-0.3.0 → f3_data_models-0.3.1}/f3_data_models/models.py +33 -20
- {f3_data_models-0.3.0 → f3_data_models-0.3.1}/pyproject.toml +1 -1
- {f3_data_models-0.3.0 → f3_data_models-0.3.1}/README.md +0 -0
- {f3_data_models-0.3.0 → f3_data_models-0.3.1}/f3_data_models/__init__.py +0 -0
- {f3_data_models-0.3.0 → f3_data_models-0.3.1}/f3_data_models/utils.py +0 -0
@@ -45,30 +45,40 @@ dt_update = Annotated[
|
|
45
45
|
]
|
46
46
|
|
47
47
|
|
48
|
-
class
|
48
|
+
class User_Status(enum.Enum):
|
49
49
|
active = 1
|
50
50
|
inactive = 2
|
51
51
|
deleted = 3
|
52
52
|
|
53
53
|
|
54
|
-
class
|
54
|
+
class Region_Role(enum.Enum):
|
55
55
|
user = 1
|
56
56
|
editor = 2
|
57
57
|
admin = 3
|
58
58
|
|
59
59
|
|
60
|
-
class
|
60
|
+
class User_Role(enum.Enum):
|
61
61
|
user = 1
|
62
62
|
editor = 2
|
63
63
|
admin = 3
|
64
64
|
|
65
65
|
|
66
|
-
class
|
66
|
+
class Update_Request_Status(enum.Enum):
|
67
67
|
pending = 1
|
68
68
|
approved = 2
|
69
69
|
rejected = 3
|
70
70
|
|
71
71
|
|
72
|
+
class Day_Of_Week(enum.Enum):
|
73
|
+
monday = 0
|
74
|
+
tuesday = 1
|
75
|
+
wednesday = 2
|
76
|
+
thursday = 3
|
77
|
+
friday = 4
|
78
|
+
saturday = 5
|
79
|
+
sunday = 6
|
80
|
+
|
81
|
+
|
72
82
|
class Base(DeclarativeBase):
|
73
83
|
"""
|
74
84
|
Base class for all models, providing common methods.
|
@@ -219,7 +229,7 @@ class Role(Base):
|
|
219
229
|
|
220
230
|
Attributes:
|
221
231
|
id (int): Primary Key of the model.
|
222
|
-
name (
|
232
|
+
name (Region_Role): The name of the role.
|
223
233
|
description (Optional[text]): A description of the role.
|
224
234
|
created (datetime): The timestamp when the record was created.
|
225
235
|
updated (datetime): The timestamp when the record was last updated.
|
@@ -228,7 +238,7 @@ class Role(Base):
|
|
228
238
|
__tablename__ = "roles"
|
229
239
|
|
230
240
|
id: Mapped[intpk]
|
231
|
-
name: Mapped[
|
241
|
+
name: Mapped[Region_Role]
|
232
242
|
description: Mapped[Optional[text]]
|
233
243
|
created: Mapped[dt_create]
|
234
244
|
updated: Mapped[dt_update]
|
@@ -546,8 +556,12 @@ class Location(Base):
|
|
546
556
|
description: Mapped[Optional[text]]
|
547
557
|
is_active: Mapped[bool]
|
548
558
|
email: Mapped[Optional[str]]
|
549
|
-
latitude: Mapped[Optional[float]]
|
550
|
-
|
559
|
+
latitude: Mapped[Optional[float]] = mapped_column(
|
560
|
+
Float(precision=8, decimal_return_scale=5)
|
561
|
+
)
|
562
|
+
longitude: Mapped[Optional[float]] = mapped_column(
|
563
|
+
Float(precision=8, decimal_return_scale=5)
|
564
|
+
)
|
551
565
|
address_street: Mapped[Optional[str]]
|
552
566
|
address_street2: Mapped[Optional[str]]
|
553
567
|
address_city: Mapped[Optional[str]]
|
@@ -575,7 +589,7 @@ class Event(Base):
|
|
575
589
|
end_date (Optional[date]): The end date of the event.
|
576
590
|
start_time (Optional[time_with_tz]): The start time of the event.
|
577
591
|
end_time (Optional[time_with_tz]): The end time of the event.
|
578
|
-
day_of_week (Optional[
|
592
|
+
day_of_week (Optional[Day_Of_Week]): The day of the week of the event.
|
579
593
|
name (str): The name of the event.
|
580
594
|
description (Optional[text]): A description of the event.
|
581
595
|
email (Optional[str]): A contact email address associated with the event.
|
@@ -613,9 +627,9 @@ class Event(Base):
|
|
613
627
|
highlight: Mapped[bool] = mapped_column(Boolean, default=False)
|
614
628
|
start_date: Mapped[date]
|
615
629
|
end_date: Mapped[Optional[date]]
|
616
|
-
start_time: Mapped[Optional[
|
617
|
-
end_time: Mapped[Optional[
|
618
|
-
day_of_week: Mapped[Optional[
|
630
|
+
start_time: Mapped[Optional[time_notz]]
|
631
|
+
end_time: Mapped[Optional[time_notz]]
|
632
|
+
day_of_week: Mapped[Optional[Day_Of_Week]]
|
619
633
|
name: Mapped[str]
|
620
634
|
description: Mapped[Optional[text]]
|
621
635
|
email: Mapped[Optional[str]]
|
@@ -733,10 +747,9 @@ class User(Base):
|
|
733
747
|
avatar_url: Mapped[Optional[str]]
|
734
748
|
meta: Mapped[Optional[Dict[str, Any]]]
|
735
749
|
email_verified: Mapped[Optional[datetime]]
|
736
|
-
status: Mapped[
|
737
|
-
Enum(
|
750
|
+
status: Mapped[User_Status] = mapped_column(
|
751
|
+
Enum(User_Status), default=User_Status.active
|
738
752
|
)
|
739
|
-
role: Mapped[UserRole] = mapped_column(Enum(UserRole), default=UserRole.user)
|
740
753
|
created: Mapped[dt_create]
|
741
754
|
updated: Mapped[dt_update]
|
742
755
|
|
@@ -1091,7 +1104,7 @@ class UpdateRequest(Base):
|
|
1091
1104
|
event_end_date (Optional[date]): The end date of the event.
|
1092
1105
|
event_start_time (Optional[time_notz]): The start time of the event.
|
1093
1106
|
event_end_time (Optional[time_notz]): The end time of the event.
|
1094
|
-
event_day_of_week (Optional[
|
1107
|
+
event_day_of_week (Optional[Day_Of_Week]): The day of the week of the event.
|
1095
1108
|
event_name (str): The name of the event.
|
1096
1109
|
event_description (Optional[text]): A description of the event.
|
1097
1110
|
event_recurrence_pattern (Optional[str]): The recurrence pattern of the event.
|
@@ -1116,7 +1129,7 @@ class UpdateRequest(Base):
|
|
1116
1129
|
submitter_validated (Optional[bool]): Whether the submitter has validated the request. Default is False.
|
1117
1130
|
reviewed_by (Optional[str]): The user who reviewed the request.
|
1118
1131
|
reviewed_at (Optional[datetime]): The timestamp when the request was reviewed.
|
1119
|
-
status (
|
1132
|
+
status (Update_Request_Status): The status of the request. Default is 'pending'.
|
1120
1133
|
meta (Optional[Dict[str, Any]]): Additional metadata for the request.
|
1121
1134
|
created (datetime): The timestamp when the record was created.
|
1122
1135
|
updated (datetime): The timestamp when the record was last updated.
|
@@ -1138,7 +1151,7 @@ class UpdateRequest(Base):
|
|
1138
1151
|
event_end_date: Mapped[Optional[date]]
|
1139
1152
|
event_start_time: Mapped[Optional[time_notz]]
|
1140
1153
|
event_end_time: Mapped[Optional[time_notz]]
|
1141
|
-
event_day_of_week: Mapped[Optional[
|
1154
|
+
event_day_of_week: Mapped[Optional[Day_Of_Week]]
|
1142
1155
|
event_name: Mapped[str]
|
1143
1156
|
event_description: Mapped[Optional[text]]
|
1144
1157
|
event_recurrence_pattern: Mapped[Optional[str]] = mapped_column(VARCHAR(length=30))
|
@@ -1170,8 +1183,8 @@ class UpdateRequest(Base):
|
|
1170
1183
|
submitter_validated: Mapped[Optional[bool]] = mapped_column(Boolean, default=False)
|
1171
1184
|
reviewed_by: Mapped[Optional[text]]
|
1172
1185
|
reviewed_at: Mapped[Optional[datetime]]
|
1173
|
-
status: Mapped[
|
1174
|
-
Enum(
|
1186
|
+
status: Mapped[Update_Request_Status] = mapped_column(
|
1187
|
+
Enum(Update_Request_Status), default=Update_Request_Status.pending
|
1175
1188
|
)
|
1176
1189
|
meta: Mapped[Optional[Dict[str, Any]]]
|
1177
1190
|
|
File without changes
|
File without changes
|
File without changes
|