f3-data-models 0.2.4__tar.gz → 0.2.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: f3-data-models
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: The data schema and models for F3 Nation applications.
5
5
  License: MIT
6
6
  Author: Evan Petzoldt
@@ -285,7 +285,6 @@ class Org(Base):
285
285
  event_tags (Optional[List[EventTag]]): The event tags associated with the organization. Used to control which event tags are available for selection at the region level.
286
286
  achievements (Optional[List[Achievement]]): The achievements available within the organization.
287
287
  parent_org (Optional[Org]): The parent organization.
288
- event_tags_x_org (Optional[List[EventTag_x_Org]]): The association between event tags and organizations.
289
288
  slack_space (Optional[SlackSpace]): The associated Slack workspace.
290
289
  """
291
290
 
@@ -313,10 +312,16 @@ class Org(Base):
313
312
  "Location", cascade="expunge"
314
313
  )
315
314
  event_types: Mapped[Optional[List["EventType"]]] = relationship(
316
- "EventType", secondary="event_types_x_org", cascade="expunge", viewonly=True
315
+ "EventType",
316
+ primaryjoin="or_(EventType.specific_org_id == Org.id, EventType.specific_org_id.is_(None))",
317
+ cascade="expunge",
318
+ viewonly=True,
317
319
  )
318
320
  event_tags: Mapped[Optional[List["EventTag"]]] = relationship(
319
- "EventTag", secondary="event_tags_x_org", cascade="expunge", viewonly=True
321
+ "EventTag",
322
+ primaryjoin="or_(EventTag.specific_org_id == Org.id, EventTag.specific_org_id.is_(None))",
323
+ cascade="expunge",
324
+ viewonly=True,
320
325
  )
321
326
  achievements: Mapped[Optional[List["Achievement"]]] = relationship(
322
327
  "Achievement", secondary="achievements_x_org", cascade="expunge"
@@ -324,9 +329,6 @@ class Org(Base):
324
329
  parent_org: Mapped[Optional["Org"]] = relationship(
325
330
  "Org", remote_side=[id], cascade="expunge"
326
331
  )
327
- event_tags_x_org: Mapped[Optional[List["EventTag_x_Org"]]] = relationship(
328
- "EventTag_x_Org", cascade="expunge"
329
- )
330
332
  slack_space: Mapped[Optional["SlackSpace"]] = relationship(
331
333
  "SlackSpace", secondary="orgs_x_slack_spaces", cascade="expunge"
332
334
  )
@@ -342,6 +344,7 @@ class EventType(Base):
342
344
  description (Optional[text]): A description of the event type.
343
345
  acronym (Optional[str]): Acronyms associated with the event type.
344
346
  category_id (int): The ID of the associated event category.
347
+ specific_org_id (Optional[int]): The ID of the specific organization.
345
348
  created (datetime): The timestamp when the record was created.
346
349
  updated (datetime): The timestamp when the record was last updated.
347
350
  """
@@ -353,6 +356,7 @@ class EventType(Base):
353
356
  description: Mapped[Optional[text]]
354
357
  acronym: Mapped[Optional[str]]
355
358
  category_id: Mapped[int] = mapped_column(ForeignKey("event_categories.id"))
359
+ specific_org_id: Mapped[Optional[int]] = mapped_column(ForeignKey("orgs.id"))
356
360
  created: Mapped[dt_create]
357
361
  updated: Mapped[dt_update]
358
362
 
@@ -378,23 +382,23 @@ class EventType_x_Event(Base):
378
382
  event: Mapped["Event"] = relationship(back_populates="event_x_event_types")
379
383
 
380
384
 
381
- class EventType_x_Org(Base):
382
- """
383
- Model representing the association between event types and organizations. This controls which event types are available for selection at the region level, as well as default types for each AO.
385
+ # class EventType_x_Org(Base):
386
+ # """
387
+ # Model representing the association between event types and organizations. This controls which event types are available for selection at the region level, as well as default types for each AO.
384
388
 
385
- Attributes:
386
- event_type_id (int): The ID of the associated event type.
387
- org_id (int): The ID of the associated organization.
388
- is_default (bool): Whether this is the default event type for the organization. Default is False.
389
- """
389
+ # Attributes:
390
+ # event_type_id (int): The ID of the associated event type.
391
+ # org_id (int): The ID of the associated organization.
392
+ # is_default (bool): Whether this is the default event type for the organization. Default is False.
393
+ # """
390
394
 
391
- __tablename__ = "event_types_x_org"
395
+ # __tablename__ = "event_types_x_org"
392
396
 
393
- event_type_id: Mapped[int] = mapped_column(
394
- ForeignKey("event_types.id"), primary_key=True
395
- )
396
- org_id: Mapped[int] = mapped_column(ForeignKey("orgs.id"), primary_key=True)
397
- is_default: Mapped[bool] = mapped_column(Boolean, default=False)
397
+ # event_type_id: Mapped[int] = mapped_column(
398
+ # ForeignKey("event_types.id"), primary_key=True
399
+ # )
400
+ # org_id: Mapped[int] = mapped_column(ForeignKey("orgs.id"), primary_key=True)
401
+ # is_default: Mapped[bool] = mapped_column(Boolean, default=False)
398
402
 
399
403
 
400
404
  class EventTag(Base):
@@ -406,6 +410,7 @@ class EventTag(Base):
406
410
  name (str): The name of the event tag.
407
411
  description (Optional[text]): A description of the event tag.
408
412
  color (Optional[str]): The color used for the calendar.
413
+ specific_org_id (Optional[int]): Used for custom tags for specific regions.
409
414
  created (datetime): The timestamp when the record was created.
410
415
  updated (datetime): The timestamp when the record was last updated.
411
416
  """
@@ -416,6 +421,7 @@ class EventTag(Base):
416
421
  name: Mapped[str]
417
422
  description: Mapped[Optional[text]]
418
423
  color: Mapped[Optional[str]]
424
+ specific_org_id: Mapped[Optional[int]] = mapped_column(ForeignKey("orgs.id"))
419
425
  created: Mapped[dt_create]
420
426
  updated: Mapped[dt_update]
421
427
 
@@ -441,23 +447,23 @@ class EventTag_x_Event(Base):
441
447
  event: Mapped["Event"] = relationship(back_populates="event_x_event_tags")
442
448
 
443
449
 
444
- class EventTag_x_Org(Base):
445
- """
446
- Model representing the association between event tags and organizations. Controls which event tags are available for selection at the region level.
450
+ # class EventTag_x_Org(Base):
451
+ # """
452
+ # Model representing the association between event tags and organizations. Controls which event tags are available for selection at the region level.
447
453
 
448
- Attributes:
449
- event_tag_id (int): The ID of the associated event tag.
450
- org_id (int): The ID of the associated organization.
451
- color_override (Optional[str]): The calendar color override for the event tag (if the region wants to use something other than the default).
452
- """
454
+ # Attributes:
455
+ # event_tag_id (int): The ID of the associated event tag.
456
+ # org_id (int): The ID of the associated organization.
457
+ # color_override (Optional[str]): The calendar color override for the event tag (if the region wants to use something other than the default).
458
+ # """
453
459
 
454
- __tablename__ = "event_tags_x_org"
460
+ # __tablename__ = "event_tags_x_org"
455
461
 
456
- event_tag_id: Mapped[int] = mapped_column(
457
- ForeignKey("event_tags.id"), primary_key=True
458
- )
459
- org_id: Mapped[int] = mapped_column(ForeignKey("orgs.id"), primary_key=True)
460
- color_override: Mapped[Optional[str]]
462
+ # event_tag_id: Mapped[int] = mapped_column(
463
+ # ForeignKey("event_tags.id"), primary_key=True
464
+ # )
465
+ # org_id: Mapped[int] = mapped_column(ForeignKey("orgs.id"), primary_key=True)
466
+ # color_override: Mapped[Optional[str]]
461
467
 
462
468
 
463
469
  class Org_x_SlackSpace(Base):
@@ -674,6 +680,7 @@ class User(Base):
674
680
  home_region_id (Optional[int]): The ID of the home region.
675
681
  avatar_url (Optional[str]): The URL of the user's avatar.
676
682
  meta (Optional[Dict[str, Any]]): Additional metadata for the user.
683
+ email_verified_ts (Optional[datetime]): The timestamp when the user's email was verified.
677
684
  created (datetime): The timestamp when the record was created.
678
685
  updated (datetime): The timestamp when the record was last updated.
679
686
  """
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "f3-data-models"
3
- version = "0.2.4"
3
+ version = "0.2.5"
4
4
  description = "The data schema and models for F3 Nation applications."
5
5
  authors = ["Evan Petzoldt <evan.petzoldt@protonmail.com>"]
6
6
  readme = "README.md"
File without changes