Files
OSIT-AE-API-FastAPI/app/object_definitions/events_registration.py
Scott Idem 17a627a981 feat: Implement Event File Hosted Data Fix and API Guide Update
Address critical data visibility issues for Event Files and enhance frontend documentation.

This commit resolves the persistent problem where top-level hosted file convenience fields
(e.g., , , ) were
returning as  in V3 Event File API responses, even when .

Key changes include:
- Refactored  Pydantic model:
    - Removed redundant  definitions from top-level hosted file convenience fields,
      allowing direct mapping from SQL view columns.
    - Simplified  to focus solely on conditionally loading the nested
       object, as top-level fields are now populated directly by Pydantic
      from the  view.
    - Added comprehensive comments to clarify data flow, Pydantic's behavior, and the
      expected origin of these convenience fields from SQL views.
- Updated :
    - Introduced a new section detailing how to retrieve Event File data, including the
      use of  to get both top-level convenience fields and a nested
       object.
    - Clarified all ID references as random string IDs.
    - Renumbered the troubleshooting section.
- Copied updated guide to .
- Continued ID Vision compliance audit, ensuring consistent handling of random string IDs
  across various core and event models (Account, Address, Contact, DataStore, Event Badge Template).
- Consolidated ID Vision E2E tests and updated related documentation.
- Minor updates to  and
  to support Event File data retrieval with .
2026-02-19 15:22:17 -05:00

145 lines
6.6 KiB
Python

from app.models.event_badge_models import *
from app.models.event_badge_template_models import *
from app.models.event_person_models import *
from app.models.event_person_tracking_models import *
from app.models.event_registration_models import *
from app.models.event_person_profile_models import *
events_registration_obj_li = {
'event_badge': {
'tbl': 'event_badge',
'tbl_default': 'v_event_badge',
'tbl_alt': 'v_event_badge_only',
'tbl_update': 'event_badge',
'mdl': Event_Badge_Base,
'mdl_default': Event_Badge_Base,
'mdl_in': Event_Badge_Base,
'mdl_out': Event_Badge_Base,
# Legacy V2 keys:
'table_name': 'v_event_badge',
'table_name_alt': 'v_event_badge_only',
'tbl_name_update': 'event_badge',
'base_name': Event_Badge_Basic_Base,
# V3 Search Security:
'searchable_fields': [
'id', 'event_badge_id', 'account_id', 'event_id', 'event_id_only', 'event_badge_template_id', 'event_person_id', 'person_id',
'id_random', 'event_badge_id_random', 'account_id_random', 'event_id_random', 'event_id_random_only', 'event_badge_template_id_random', 'event_person_id_random', 'person_id_random',
'external_id', 'pronouns', 'informal_name',
'title_names', 'given_name', 'middle_name', 'family_name', 'designations',
'professional_title', 'full_name', 'affiliations', 'email', 'phone',
'location', 'allow_tracking', 'print_count', 'print_first_datetime',
'print_last_datetime', 'enable', 'hide', 'priority', 'sort', 'group',
'badge_type_code', 'badge_type_code_override', 'member_type_code',
'member_status', 'registration_type_code',
'notes', 'created_on', 'updated_on', 'default_qry_str'
],
},
'event_badge_template': {
'tbl': 'event_badge_template',
'tbl_default': 'v_event_badge_template',
'tbl_update': 'event_badge_template',
'mdl': Event_Badge_Template_Base,
'mdl_default': Event_Badge_Template_Base,
'mdl_in': Event_Badge_Template_Base,
'mdl_out': Event_Badge_Template_Base,
# Legacy V2 keys:
'table_name': 'v_event_badge_template',
'tbl_name_update': 'event_badge_template',
'base_name': Event_Badge_Template_Base,
# V3 Search Security:
'searchable_fields': [
'id', 'event_badge_template_id', 'event_id', 'account_id',
'id_random', 'event_badge_template_id_random', 'event_id_random', 'account_id_random',
'name', 'description', 'layout', 'notes', 'enable',
'created_on', 'updated_on'
],
},
'event_person': {
'tbl': 'event_person',
'tbl_default': 'v_event_person',
'tbl_update': 'event_person',
'mdl': Event_Person_Base,
'mdl_default': Event_Person_Base,
'mdl_in': Event_Person_Base,
'mdl_out': Event_Person_Base,
# Legacy V2 keys:
'table_name': 'v_event_person',
'tbl_name_update': 'event_person',
'base_name': Event_Person_Base,
# V3 Search Security:
'searchable_fields': [
'id', 'event_person_id', 'account_id', 'event_id', 'event_badge_id', 'person_id', 'user_id',
'id_random', 'event_person_id_random', 'account_id_random', 'event_id_random',
'event_badge_id_random', 'person_id_random', 'user_id_random',
'external_id', 'external_person_id', 'informal_name', 'given_name',
'family_name', 'full_name', 'email', 'enable', 'hide', 'priority', 'sort', 'group',
'notes', 'created_on', 'updated_on'
],
},
'event_person_profile': {
'tbl': 'event_person_profile',
'tbl_default': 'v_event_person_profile',
'tbl_update': 'event_person_profile',
'mdl': Event_Person_Profile_Base,
'mdl_default': Event_Person_Profile_Base,
'mdl_in': Event_Person_Profile_Base,
'mdl_out': Event_Person_Profile_Base,
# Legacy V2 keys:
'table_name': 'v_event_person_profile',
'tbl_name_update': 'event_person_profile',
'base_name': Event_Person_Profile_Base,
# V3 Search Security:
'searchable_fields': [
'id', 'event_person_profile_id', 'account_id', 'contact_id', 'event_id', 'event_person_id', 'organization_id',
'id_random', 'event_person_profile_id_random', 'account_id_random',
'contact_id_random', 'event_id_random', 'event_person_id_random',
'organization_id_random', 'pronouns', 'informal_name', 'given_name',
'family_name', 'professional_title', 'full_name', 'affiliations',
'email', 'enable', 'priority', 'sort', 'group', 'notes', 'created_on',
'updated_on'
],
},
'event_person_tracking': {
'tbl': 'event_person_tracking',
'tbl_default': 'v_event_person_tracking',
'tbl_update': 'event_person_tracking',
'mdl': Event_Person_Tracking_Base,
'mdl_default': Event_Person_Tracking_Base,
'mdl_in': Event_Person_Tracking_Base,
'mdl_out': Event_Person_Tracking_Base,
# Legacy V2 keys:
'table_name': 'v_event_person_tracking',
'tbl_name_update': 'event_person_tracking',
'base_name': Event_Person_Tracking_Base,
# V3 Search Security:
'searchable_fields': [
'id', 'event_person_tracking_id', 'account_id', 'event_id', 'event_session_id', 'event_person_id',
'id_random', 'event_person_tracking_id_random', 'account_id_random', 'event_id_random',
'event_session_id_random', 'event_person_id_random',
'check_in_out', 'in_datetime', 'out_datetime', 'enable', 'notes',
'created_on', 'updated_on'
],
},
'event_registration': {
'tbl': 'event_registration',
'tbl_default': 'v_event_registration',
'tbl_update': 'event_registration',
'mdl': Event_Registration_Base,
'mdl_default': Event_Registration_Base,
'mdl_in': Event_Registration_Base,
'mdl_out': Event_Registration_Base,
# Legacy V2 keys:
'table_name': 'v_event_registration',
'tbl_name_update': 'event_registration',
'base_name': Event_Registration_Base,
# V3 Search Security:
'searchable_fields': [
'id', 'event_registration_id', 'account_id', 'event_id', 'organization_id', 'contact_id', 'person_id',
'id_random', 'event_registration_id_random', 'account_id_random',
'event_id_random', 'organization_id_random', 'contact_id_random',
'person_id_random', 'notes', 'created_on',
'updated_on'
],
},
}