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 the Priority enum, the creation of new models like Checklist, ChecklistStep, and Frequency, and the removal of deprecated models.
New Models and Enums:
Added Priority enum to represent different priority levels for checklists (LOW, MEDIUM, HIGH). ([src/support_sphere_py/src/support_sphere/models/enums/priority.pyR1-R11](diffhunk://#diff-59185b973de38181884faf346268fa1ec2a2ab160d04bafe6f9f80fd41f2c11cR1-R11))
Added Checklist model to represent a checklist entity, including attributes like id, title, description, priority, and relationships with Frequency and UserChecklists. ([src/support_sphere_py/src/support_sphere/models/public/checklist.pyR1-R51](diffhunk://#diff-f6520240393b42aca39ba8d41f21c281311f2e3bfe5ceda8c9a970d0db077e99R1-R51))
Added Frequency model to represent the frequency of checklist recurrences, with attributes like id, name, and num_days. ([src/support_sphere_py/src/support_sphere/models/public/frequency.pyR1-R29](diffhunk://#diff-1541aef48b949208a66eb40d2f7dabf01c25102a6adc2dd46f3be31811af5291R1-R29))
Added ChecklistStepsState model to track the state of checklist steps for users, including attributes like id, checklist_steps_order_id, user_profile_id, and is_completed. ([src/support_sphere_py/src/support_sphere/models/public/checklist_steps_state.pyR1-R32](diffhunk://#diff-e88ff0de75614461e4850b5d9bb85f1b6872d666113db244f5538f1d6d657b79R1-R32))
Updated Models:
Renamed ChecklistStepsTemplate to ChecklistStep and updated its attributes and relationships to better reflect its purpose. ([src/support_sphere_py/src/support_sphere/models/public/checklist_step.pyR3-R9](diffhunk://#diff-3a6812571549045ddf213bff59c370adaf685b172dd2da5a7a4b51a104db62c9R3-R9))
Updated ChecklistStepsOrder model to include new attributes and relationships, such as checklist_id, checklist_step_id, and priority. ([src/support_sphere_py/src/support_sphere/models/public/checklist_steps_order.pyL31-R42](diffhunk://#diff-479946ad6ea1e1f9088069ebe8d0e7a5d24ba4385d12eb180fe75f5f2e939d3eL31-R42))
Modified UserChecklist model to UserChecklists, updating its attributes and relationships to align with the new Checklist model. ([src/support_sphere_py/src/support_sphere/models/public/user_checklist.pyL9-R9](diffhunk://#diff-4b0a4c7a4c3ece2a992ffd128e01c10c15d35144c4bd9db175e2752e70750ccfL9-R9))
Removed Deprecated Models:
Removed ChecklistType, RecurringType, and UserChecklistState models as they are no longer needed with the new structure. ([[1]](diffhunk://#diff-a8cd6569fad45cfd701058aa570a06c250419aa6d917170048640dc4b1b1d92bL1-L49), [[2]](diffhunk://#diff-278d96ce6fe4205c0840c0b6ede21e8e17ada00a0e4d8dea62da86efa71f19f1L1-L29), [[3]](diffhunk://#diff-e3ab9e10ac61625d5daec471db4f72263e130bdaea9858b064a20620f84d3360L1-L33))
Import and Export Updates:
Updated import statements and __all__ lists in several __init__.py files to reflect the new and updated models. ([[1]](diffhunk://#diff-c3f2e0b8fe4389309c711dc7bfd8632b124a9152759ae978db65df9ac914c0adR4-R7), [[2]](diffhunk://#diff-2fd7615f1a2aa0dcf722cc23576a73dfd71ba3f0009a670526f6303ab10e8ef6L2-L39), [[3]](diffhunk://#diff-2fd7615f1a2aa0dcf722cc23576a73dfd71ba3f0009a670526f6303ab10e8ef6L48-R52))
Related issues
[X] #178
[X] #139
TODO:
[x] Go through docstrings to make sure it's accurate
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](diffhunk://#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](diffhunk://#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](diffhunk://#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](diffhunk://#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](diffhunk://#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](diffhunk://#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](diffhunk://#diff-4b0a4c7a4c3ece2a992ffd128e01c10c15d35144c4bd9db175e2752e70750ccfL9-R9)
)Removed Deprecated Models:
ChecklistType
,RecurringType
, andUserChecklistState
models as they are no longer needed with the new structure. ([[1]](diffhunk://#diff-a8cd6569fad45cfd701058aa570a06c250419aa6d917170048640dc4b1b1d92bL1-L49)
,[[2]](diffhunk://#diff-278d96ce6fe4205c0840c0b6ede21e8e17ada00a0e4d8dea62da86efa71f19f1L1-L29)
,[[3]](diffhunk://#diff-e3ab9e10ac61625d5daec471db4f72263e130bdaea9858b064a20620f84d3360L1-L33)
)Import and Export Updates:
__all__
lists in several__init__.py
files to reflect the new and updated models. ([[1]](diffhunk://#diff-c3f2e0b8fe4389309c711dc7bfd8632b124a9152759ae978db65df9ac914c0adR4-R7)
,[[2]](diffhunk://#diff-2fd7615f1a2aa0dcf722cc23576a73dfd71ba3f0009a670526f6303ab10e8ef6L2-L39)
,[[3]](diffhunk://#diff-2fd7615f1a2aa0dcf722cc23576a73dfd71ba3f0009a670526f6303ab10e8ef6L48-R52)
)Related issues
TODO: