Files
OSIT-AE-API-FastAPI/app/object_definitions/events_general.py
Scott Idem bdd1bd2ba2 feat(search): enhance V3 ID Vision mapping and searchable fields
- Update lib_sql_search.py to include comprehensive 'vision_fields' mapping for most core objects
- Ensure Vision Mapping only triggers for non-integer values to support backend filters
- Add clean ID names (e.g., 'event_id', 'account_id') to searchable_fields whitelists in Events, Badges, and Journal object definitions
- Resolve Concatenation typo in vision_fields list
- Improve searchability for Journal Entries by adding 'default_qry_str'
2026-01-21 19:21:52 -05:00

120 lines
4.8 KiB
Python

from app.models.event_models import *
from app.models.event_file_models import *
from app.models.event_device_models import *
from app.models.event_cfg_models import *
events_general_obj_li = {
'event': {
'tbl': 'event',
'tbl_default': 'v_event',
'tbl_alt': 'v_event_w_file_count',
'tbl_update': 'event',
'mdl': Event_Base,
'mdl_default': Event_Base,
'mdl_alt': Event_Meeting_Flat_Base,
'mdl_in': Event_Base,
'mdl_out': Event_Base,
# Legacy V2 keys:
'table_name': 'v_event',
'table_name_alt': 'v_event_w_file_count',
'tbl_name_update': 'event',
'base_name': Event_Base,
'base_name_alt': Event_Meeting_Flat_Base,
'public_read': True,
'exp_default': [
'event_id_random',
'conference', 'type',
'name', 'description',
'location_text', 'physical', 'virtual',
'attend_url', 'attend_url_text', 'attend_url_passcode', 'attend_phone', 'attend_phone_passcode', 'attend_text',
'contact_1_id', 'contact_2_id',
'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
],
'exp_idaa': [
'event_id_random',
'external_person_id', # IDAA Novi ID
'conference', 'type',
'name', 'description',
'format', 'timezone', 'recurring', 'recurring_pattern', 'recurring_start_time', 'recurring_end_time', 'recurring_text',
'weekday_sunday', 'weekday_monday', 'weekday_tuesday', 'weekday_wednesday', 'weekday_thursday', 'weekday_friday', 'weekday_saturday',
'location_text', 'physical', 'virtual',
'attend_url', 'attend_url_passcode', 'attend_phone', 'attend_phone_passcode', 'attend_text',
'contact_1_id', 'contact_2_id',
'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
],
# V3 Search Security:
'searchable_fields': [
'account_id', 'event_id',
'event_id_random', 'account_id_random', 'event_code', 'conference',
'type', 'name', 'summary', 'description', 'format', 'timezone',
'location_text', 'status', 'enable', 'hide', 'priority', 'sort',
'group', 'notes', 'created_on', 'updated_on', 'default_qry_str'
],
},
'event_file': {
'tbl': 'event_file',
'tbl_default': 'v_event_file_simple',
'tbl_alt': 'v_event_file',
'tbl_update': 'event_file',
'mdl': Event_File_Base,
'mdl_default': Event_File_Base,
'mdl_in': Event_File_Base,
'mdl_out': Event_File_Base,
# Legacy V2 keys:
'table_name': 'v_event_file_simple',
'table_name_alt': 'v_event_file',
'tbl_name_update': 'event_file',
'base_name': Event_File_Base,
'public_read': True,
# V3 Search Security:
'searchable_fields': [
'event_id', 'event_file_id', 'hosted_file_id',
'event_file_id_random', 'hosted_file_id_random', 'event_id_random',
'event_exhibit_id_random', 'event_location_id_random',
'event_presentation_id_random', 'event_presenter_id_random',
'event_session_id_random', 'event_track_id_random', 'filename',
'extension', 'title', 'description', 'file_purpose', 'enable', 'hide',
'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on'
],
},
'event_device': {
'tbl': 'event_device',
'tbl_default': 'v_event_device',
'tbl_alt': 'v_event_device',
'tbl_update': 'event_device',
'mdl': Event_Device_Base,
'mdl_default': Event_Device_Base,
'mdl_in': Event_Device_Base,
'mdl_out': Event_Device_Base,
# Legacy V2 keys:
'table_name': 'v_event_device',
'tbl_name_update': 'event_device',
'base_name': Event_Device_Base,
# V3 Search Security:
'searchable_fields': [
'event_device_id_random', 'account_id_random', 'event_id_random',
'event_location_id_random', 'code', 'name', 'description', 'app_mode',
'enable', 'hide', 'priority', 'sort', 'group', 'event_notes', 'notes',
'created_on', 'updated_on'
],
},
'event_cfg': {
'tbl': 'event_cfg',
'tbl_default': 'event_cfg',
'tbl_update': 'event_cfg',
'mdl': Event_Cfg_Base,
'mdl_default': Event_Cfg_Base,
'mdl_in': Event_Cfg_Base,
'mdl_out': Event_Cfg_Base,
# Legacy V2 keys:
'table_name': 'event_cfg',
'tbl_name_update': 'event_cfg',
'base_name': Event_Cfg_Base,
# V3 Search Security:
'searchable_fields': [
'event_cfg_id_random', 'event_id_random',
'status', 'notes', 'updated_on'
],
},
}