Add archive_content fields and docs
This commit is contained in:
@@ -36,6 +36,9 @@ class Archive_Content_Base(BaseModel):
|
|||||||
lu_media_type_id: Optional[int]
|
lu_media_type_id: Optional[int]
|
||||||
lu_media_type: Optional[str]
|
lu_media_type: Optional[str]
|
||||||
|
|
||||||
|
external_id: Optional[str]
|
||||||
|
code: Optional[str]
|
||||||
|
|
||||||
name: Optional[str]
|
name: Optional[str]
|
||||||
description: Optional[str]
|
description: Optional[str]
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ other_obj_li = {
|
|||||||
],
|
],
|
||||||
# V3 Search Security:
|
# V3 Search Security:
|
||||||
'searchable_fields': [
|
'searchable_fields': [
|
||||||
'id', 'account_id', 'id_random', 'sponsorship_id_random', 'account_id_random',
|
'id', 'account_id', 'id_random', 'sponsorship_id_random', 'account_id_random',
|
||||||
'name', 'description', 'website_url', 'level_str', 'enable', 'hide',
|
'name', 'description', 'website_url', 'level_str', 'enable', 'hide',
|
||||||
'priority', 'group', 'created_on', 'updated_on'
|
'priority', 'group', 'created_on', 'updated_on'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -50,8 +50,8 @@ other_obj_li = {
|
|||||||
'base_name': Sponsorship_Cfg_Base,
|
'base_name': Sponsorship_Cfg_Base,
|
||||||
# V3 Search Security:
|
# V3 Search Security:
|
||||||
'searchable_fields': [
|
'searchable_fields': [
|
||||||
'id', 'account_id', 'id_random', 'sponsorship_cfg_id_random', 'account_id_random',
|
'id', 'account_id', 'id_random', 'sponsorship_cfg_id_random', 'account_id_random',
|
||||||
'name', 'description', 'enable', 'hide', 'priority', 'sort', 'group',
|
'name', 'description', 'enable', 'hide', 'priority', 'sort', 'group',
|
||||||
'notes', 'created_on', 'updated_on'
|
'notes', 'created_on', 'updated_on'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -86,9 +86,9 @@ other_obj_li = {
|
|||||||
],
|
],
|
||||||
# V3 Search Security:
|
# V3 Search Security:
|
||||||
'searchable_fields': [
|
'searchable_fields': [
|
||||||
'id', 'account_id', 'id_random', 'archive_id_random', 'account_id_random',
|
'id', 'account_id', 'id_random', 'archive_id_random', 'account_id_random',
|
||||||
'archive_type_id_random', 'archive_type', 'name', 'description',
|
'archive_type_id_random', 'archive_type', 'name', 'description',
|
||||||
'filename', 'original_location', 'enable', 'hide', 'priority',
|
'filename', 'original_location', 'enable', 'hide', 'priority',
|
||||||
'sort', 'group', 'notes', 'created_on', 'updated_on'
|
'sort', 'group', 'notes', 'created_on', 'updated_on'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -108,7 +108,7 @@ other_obj_li = {
|
|||||||
'searchable_fields': [
|
'searchable_fields': [
|
||||||
'id', 'account_id', 'archive_id', 'hosted_file_id',
|
'id', 'account_id', 'archive_id', 'hosted_file_id',
|
||||||
'id_random', 'archive_content_id_random', 'account_id_random', 'archive_id_random',
|
'id_random', 'archive_content_id_random', 'account_id_random', 'archive_id_random',
|
||||||
'archive_content_type', 'lu_media_type', 'name', 'description',
|
'archive_content_type', 'lu_media_type', 'external_id', 'code', 'name', 'description',
|
||||||
'filename', 'file_extension', 'original_location', 'original_url',
|
'filename', 'file_extension', 'original_location', 'original_url',
|
||||||
'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on'
|
'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on'
|
||||||
],
|
],
|
||||||
@@ -137,9 +137,9 @@ other_obj_li = {
|
|||||||
],
|
],
|
||||||
# V3 Search Security:
|
# V3 Search Security:
|
||||||
'searchable_fields': [
|
'searchable_fields': [
|
||||||
'id', 'account_id', 'id_random', 'hosted_file_id_random', 'account_id_random',
|
'id', 'account_id', 'id_random', 'hosted_file_id_random', 'account_id_random',
|
||||||
'hash_sha256', 'title', 'description', 'filename', 'extension',
|
'hash_sha256', 'title', 'description', 'filename', 'extension',
|
||||||
'content_type', 'enable', 'hide', 'priority', 'sort', 'group',
|
'content_type', 'enable', 'hide', 'priority', 'sort', 'group',
|
||||||
'notes', 'created_on', 'updated_on'
|
'notes', 'created_on', 'updated_on'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -157,8 +157,8 @@ other_obj_li = {
|
|||||||
'base_name': Hosted_File_Link_Base,
|
'base_name': Hosted_File_Link_Base,
|
||||||
# V3 Search Security:
|
# V3 Search Security:
|
||||||
'searchable_fields': [
|
'searchable_fields': [
|
||||||
'id', 'account_id', 'hosted_file_id', 'id_random', 'account_id_random',
|
'id', 'account_id', 'hosted_file_id', 'id_random', 'account_id_random',
|
||||||
'hosted_file_id_random', 'link_to_type', 'link_to_id_random',
|
'hosted_file_id_random', 'link_to_type', 'link_to_id_random',
|
||||||
'created_on', 'updated_on'
|
'created_on', 'updated_on'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -226,8 +226,8 @@ other_obj_li = {
|
|||||||
'base_name': Grant_Base,
|
'base_name': Grant_Base,
|
||||||
# V3 Search Security:
|
# V3 Search Security:
|
||||||
'searchable_fields': [
|
'searchable_fields': [
|
||||||
'id', 'account_id', 'id_random', 'grant_id_random', 'account_id_random',
|
'id', 'account_id', 'id_random', 'grant_id_random', 'account_id_random',
|
||||||
'code', 'name', 'description', 'enable', 'hide', 'priority', 'sort',
|
'code', 'name', 'description', 'enable', 'hide', 'priority', 'sort',
|
||||||
'group', 'notes', 'created_on', 'updated_on'
|
'group', 'notes', 'created_on', 'updated_on'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,6 +37,17 @@ Finalized Jan 15, 2026, to ensure boot stability.
|
|||||||
- **POST Based**: Complex filtering is handled via `POST /search` with a JSON body containing `and`, `or`, and `not` logic.
|
- **POST Based**: Complex filtering is handled via `POST /search` with a JSON body containing `and`, `or`, and `not` logic.
|
||||||
- **Hybrid Filtering**: (Proposed) Query parameters should append simple standard filters (e.g., `?enabled=true`) to the complex body logic.
|
- **Hybrid Filtering**: (Proposed) Query parameters should append simple standard filters (e.g., `?enabled=true`) to the complex body logic.
|
||||||
|
|
||||||
|
### Field Evolution Checklist
|
||||||
|
When a table or view gains, loses, or renames fields, keep the API contract and search registry in sync:
|
||||||
|
|
||||||
|
1. Update the Pydantic model in `app/models/` first so CRUD serialization matches the new shape.
|
||||||
|
2. Update the SQL view or table projection so `GET` and `SEARCH` responses actually return the field.
|
||||||
|
3. Update `searchable_fields` in `app/object_definitions/` only for fields that should be searchable.
|
||||||
|
4. Add write-only, virtual, or view-only fields to `fields_to_exclude_from_db` when they must not be persisted.
|
||||||
|
5. Run the schema/search E2E tests that cover the object type before handing the change off.
|
||||||
|
|
||||||
|
For `archive_content`, the public field set now includes `external_id` and `code`, and future additions should follow the same order of operations.
|
||||||
|
|
||||||
### Response Views (Proposed)
|
### Response Views (Proposed)
|
||||||
- Implement a `view` parameter (e.g., `?view=rich`) to allow clients to request joined data without using legacy `use_alt_tbl` flags.
|
- Implement a `view` parameter (e.g., `?view=rich`) to allow clients to request joined data without using legacy `use_alt_tbl` flags.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user