- 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'
57 lines
2.0 KiB
Python
57 lines
2.0 KiB
Python
from app.models.journal_models import *
|
|
from app.models.journal_entry_models import *
|
|
|
|
journal_obj_li = {
|
|
'journal': {
|
|
'tbl': 'journal',
|
|
'tbl_default': 'v_journal',
|
|
'tbl_update': 'journal',
|
|
'mdl': Journal_Base,
|
|
'mdl_default': Journal_Base,
|
|
'mdl_in': Journal_Base,
|
|
'mdl_out': Journal_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_journal',
|
|
'tbl_name_update': 'journal',
|
|
'base_name': Journal_Base,
|
|
'exp_default': [
|
|
'journal_id_random',
|
|
'title', 'description',
|
|
],
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'id', 'account_id', 'person_id', 'user_id',
|
|
'journal_id_random', 'account_id_random', 'person_id_random', 'user_id_random',
|
|
'name', 'short_name', 'summary', 'outline',
|
|
'description', 'type_code', 'tags', 'billable',
|
|
'enable', 'hide', 'priority', 'sort', 'group', 'notes',
|
|
'created_on', 'updated_on', 'default_qry_str'
|
|
],
|
|
},
|
|
'journal_entry': {
|
|
'tbl': 'journal_entry',
|
|
'tbl_default': 'v_journal_entry',
|
|
'tbl_update': 'journal_entry',
|
|
'mdl': Journal_Entry_Base,
|
|
'mdl_default': Journal_Entry_Base,
|
|
'mdl_in': Journal_Entry_Base,
|
|
'mdl_out': Journal_Entry_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_journal_entry',
|
|
'tbl_name_update': 'journal_entry',
|
|
'base_name': Journal_Entry_Base,
|
|
'exp_default': [
|
|
'journal_entry_id_random',
|
|
],
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'id', 'journal_id', 'account_id',
|
|
'journal_entry_id_random', 'journal_id_random', 'account_id_random',
|
|
'name', 'short_name',
|
|
'summary', 'content', 'type_code', 'topic_code', 'category_code',
|
|
'tags', 'location', 'billable', 'enable', 'hide', 'priority', 'enable', 'hide', 'priority', 'sort', 'group', 'notes',
|
|
'created_on', 'updated_on', 'default_qry_str'
|
|
],
|
|
},
|
|
}
|