f3-data-models 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

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/models.py CHANGED
@@ -45,30 +45,40 @@ dt_update = Annotated[
45
45
  ]
46
46
 
47
47
 
48
- class UserStatus(enum.Enum):
48
+ class User_Status(enum.Enum):
49
49
  active = 1
50
50
  inactive = 2
51
51
  deleted = 3
52
52
 
53
53
 
54
- class RegionRole(enum.Enum):
54
+ class Region_Role(enum.Enum):
55
55
  user = 1
56
56
  editor = 2
57
57
  admin = 3
58
58
 
59
59
 
60
- class UserRole(enum.Enum):
60
+ class User_Role(enum.Enum):
61
61
  user = 1
62
62
  editor = 2
63
63
  admin = 3
64
64
 
65
65
 
66
- class UpdateRequestStatus(enum.Enum):
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 (RegionRole): The name of the role.
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[RegionRole]
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
- longitude: Mapped[Optional[float]]
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[int]): The day of the week of the event. (0=Monday, 6=Sunday)
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[time_with_tz]]
617
- end_time: Mapped[Optional[time_with_tz]]
618
- day_of_week: Mapped[Optional[int]]
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[UserStatus] = mapped_column(
737
- Enum(UserStatus), default=UserStatus.active
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[int]): The day of the week of the event.
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 (UpdateRequestStatus): The status of the request. Default is 'pending'.
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[str]] = mapped_column(VARCHAR(length=30))
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[UpdateRequestStatus] = mapped_column(
1174
- Enum(UpdateRequestStatus), default=UpdateRequestStatus.pending
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: f3-data-models
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: The data schema and models for F3 Nation applications.
5
5
  License: MIT
6
6
  Author: Evan Petzoldt
@@ -0,0 +1,6 @@
1
+ f3_data_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ f3_data_models/models.py,sha256=6QM-oKfT5sRYJZTO4FOVEh4kEm_07eLUhtxf8yce1n4,45505
3
+ f3_data_models/utils.py,sha256=1hdZ2tvMiNibNZvwt0dx4PhPCw_pJGg1mG2cCvwc6CI,8857
4
+ f3_data_models-0.3.1.dist-info/METADATA,sha256=H2Tw8gPNeFIhzWXngTPUeEZ8ORpuBgA9h8gm9MsHoHM,2716
5
+ f3_data_models-0.3.1.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
6
+ f3_data_models-0.3.1.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- f3_data_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- f3_data_models/models.py,sha256=JEWblYieKPFUuUUC8plPN1Z01gZKdPHiXhdNfED8avE,45307
3
- f3_data_models/utils.py,sha256=1hdZ2tvMiNibNZvwt0dx4PhPCw_pJGg1mG2cCvwc6CI,8857
4
- f3_data_models-0.3.0.dist-info/METADATA,sha256=j5uPKteAP-X1P-RqurffTB3VovKp7G_0skB-1kNZa6s,2716
5
- f3_data_models-0.3.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
6
- f3_data_models-0.3.0.dist-info/RECORD,,