Commit Graph

23 Commits

Author SHA1 Message Date
Scott Idem
0f4b4d2f51 feat: Implement V3 ID Vision and fields_to_exclude_from_db across core models
This commit refactors numerous Pydantic models to align with the V3 ID Vision standard, ensuring that primary and foreign key fields are represented as clean string IDs in the API. It also introduces and populates the  ClassVar in each model to prevent view-only fields and linked objects from being inadvertently written to the database during PATCH/POST operations.

Specifically, this includes:
- Adding  to exclude view-derived or joined fields such as , , nested objects (e.g., , ), and convenience fields (e.g., ).
- Adjusting root validators to correctly map string IDs and strip internal integer IDs for API responses.
- Resolving a KeyError by adding  to .

These changes are crucial for maintaining data integrity and consistency with the V3 API architecture.
2026-02-24 16:21:27 -05:00
Scott Idem
a02abbbe4f feat(models): implement Vision ID pattern for event_device and event_session
- Migrated event_device and event_session models to the V3 Vision ID pattern (string-based public IDs).
- Added root_validator for automatic id_random mapping and integer stripping.
- Implemented fields_to_exclude_from_db to protect database updates from convenience/view fields.
- Fixed description_json type in Journal_Base for correct JSON parsing.
- Added E2E verification tests for event_device and event_session V3 endpoints.
2026-01-30 12:38:16 -05:00
Scott Idem
f2420b958d Bug fix for Event Device related fields. the ID needed to be searchable.
Quick removal of the password from the log output
2026-01-26 11:56:31 -05:00
Scott Idem
5499070a4f Enabled event_device for CRUD v1... Adding new fields. 2024-10-17 19:23:21 -04:00
Scott Idem
792fb153e3 New status related fields for devices. 2024-10-17 14:06:16 -04:00
Scott Idem
19082a7a10 Adding cfg_json and data_json fields to more models 2024-06-11 13:35:00 -04:00
Scott Idem
6691f2a701 Updating the models to include a standard passcode field. 2024-06-10 19:40:35 -04:00
Scott Idem
fc86d826e9 Commenting out the base_fields for *_id_random in the models 2024-05-24 15:45:43 -04:00
Scott Idem
a1f5a996ae Minor changes and fixes. 2022-10-12 19:07:08 -04:00
Scott Idem
a18388e841 Minor changes 2022-09-27 20:53:12 -04:00
Scott Idem
84b33bb21f Work on event sessions and related files. Internal use is a new thing. 2022-09-15 17:47:07 -04:00
Scott Idem
493f4a7365 Moving ID random generation to the SQL db instead. General clean up. 2022-06-30 15:04:19 -04:00
Scott Idem
7731b18fad Work on event device model and related. 2022-05-25 15:38:49 -04:00
Scott Idem
dc585fb9bd Work on event device model and related. 2022-05-25 14:02:54 -04:00
Scott Idem
083da3fe7f General clean up. Work on event device. Work on creating a common core object model. 2022-05-24 11:26:34 -04:00
Scott Idem
14b03ff340 Work on event management related and created generic SQL select endpoint 2022-05-23 18:55:21 -04:00
Scott Idem
36deb7defe Updated event device model clean up 2022-05-06 11:33:48 -04:00
Scott Idem
4e930d23a6 Updated event device model with more base URL options 2022-05-06 11:23:37 -04:00
Scott Idem
a83da83b84 Updated event device model with more triggers 2022-05-06 11:04:43 -04:00
Scott Idem
674b15afab Updated event device model 2022-05-05 20:08:24 -04:00
Scott Idem
8051360bfc Work on event launcher related 2022-04-17 16:28:41 -04:00
Scott Idem
90d7619966 Added new route, methods, and models for data_store. Also minor code clean up and less debug. 2022-03-11 17:12:55 -05:00
Scott Idem
f073dd337f Mostly adding event device model, methods, and routes. Also general clean up of code. 2022-03-09 13:05:19 -05:00