feat: Add checklists models and populate #182
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several new models and updates existing ones in the
support_sphere
project to improve the structure and functionality of checklists. The most significant changes include the addition of thePriority
enum, the creation of new models likeChecklist
,ChecklistStep
, andFrequency
, and the removal of deprecated models.New Models and Enums:
Priority
enum to represent different priority levels for checklists (LOW
,MEDIUM
,HIGH
). ([src/support_sphere_py/src/support_sphere/models/enums/priority.pyR1-R11](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-59185b973de38181884faf346268fa1ec2a2ab160d04bafe6f9f80fd41f2c11cR1-R11)
)Checklist
model to represent a checklist entity, including attributes likeid
,title
,description
,priority
, and relationships withFrequency
andUserChecklists
. ([src/support_sphere_py/src/support_sphere/models/public/checklist.pyR1-R51](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-f6520240393b42aca39ba8d41f21c281311f2e3bfe5ceda8c9a970d0db077e99R1-R51)
)Frequency
model to represent the frequency of checklist recurrences, with attributes likeid
,name
, andnum_days
. ([src/support_sphere_py/src/support_sphere/models/public/frequency.pyR1-R29](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-1541aef48b949208a66eb40d2f7dabf01c25102a6adc2dd46f3be31811af5291R1-R29)
)ChecklistStepsState
model to track the state of checklist steps for users, including attributes likeid
,checklist_steps_order_id
,user_profile_id
, andis_completed
. ([src/support_sphere_py/src/support_sphere/models/public/checklist_steps_state.pyR1-R32](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-e88ff0de75614461e4850b5d9bb85f1b6872d666113db244f5538f1d6d657b79R1-R32)
)Updated Models:
ChecklistStepsTemplate
toChecklistStep
and updated its attributes and relationships to better reflect its purpose. ([src/support_sphere_py/src/support_sphere/models/public/checklist_step.pyR3-R9](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-3a6812571549045ddf213bff59c370adaf685b172dd2da5a7a4b51a104db62c9R3-R9)
)ChecklistStepsOrder
model to include new attributes and relationships, such aschecklist_id
,checklist_step_id
, andpriority
. ([src/support_sphere_py/src/support_sphere/models/public/checklist_steps_order.pyL31-R42](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-479946ad6ea1e1f9088069ebe8d0e7a5d24ba4385d12eb180fe75f5f2e939d3eL31-R42)
)UserChecklist
model toUserChecklists
, updating its attributes and relationships to align with the newChecklist
model. ([src/support_sphere_py/src/support_sphere/models/public/user_checklist.pyL9-R9](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-4b0a4c7a4c3ece2a992ffd128e01c10c15d35144c4bd9db175e2752e70750ccfL9-R9)
)Removed Deprecated Models:
ChecklistType
,RecurringType
, andUserChecklistState
models as they are no longer needed with the new structure. ([[1]](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-a8cd6569fad45cfd701058aa570a06c250419aa6d917170048640dc4b1b1d92bL1-L49)
,[[2]](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-278d96ce6fe4205c0840c0b6ede21e8e17ada00a0e4d8dea62da86efa71f19f1L1-L29)
,[[3]](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-e3ab9e10ac61625d5daec471db4f72263e130bdaea9858b064a20620f84d3360L1-L33)
)Import and Export Updates:
__all__
lists in several__init__.py
files to reflect the new and updated models. ([[1]](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-c3f2e0b8fe4389309c711dc7bfd8632b124a9152759ae978db65df9ac914c0adR4-R7)
,[[2]](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-2fd7615f1a2aa0dcf722cc23576a73dfd71ba3f0009a670526f6303ab10e8ef6L2-L39)
,[[3]](https://github.com/uw-ssec/post-disaster-comms/pull/182/files#diff-2fd7615f1a2aa0dcf722cc23576a73dfd71ba3f0009a670526f6303ab10e8ef6L48-R52)
)Related issues
TODO: