Implementation of the backend data model for the supplierOrders #159
No reviewers
Labels
No labels
CI/CD
MongoDB
PostgreSQL
api
authentication
bug
documentation
duplicate
enhancement
example issue
fix
good first issue
help wanted
high-level requirement
infrastructure
invalid
low-level requirement
medium-level requirement
question
security
test
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AndreFerreira5/starranja!159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "data-model-for-supplierOrders"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This data model was based on the documentation recently updated in #152 that was not yet review. With that in mind, any changes required in the base structure of supplierOrders will also need to be updated in the file models\supplier_order.py
Closes #158
The Pydantic models and DTO structure look good, but the database index definitions require changes to ensure performance and consistency with the database setup script.
Sparse Index for workOrderId: The index for workOrderId must be sparse. Since this field is optional, a standard index will index all null values, wasting resources. This is a mandatory requirement to match the behavior defined in the DB setup script.
Centralize Index Definitions: Defining indexes in two places (inline with Annotated and inside Settings) causes redundancy. You must remove the inline Indexed() wrappers and define all indexes centrally in the Settings class to support the required sparse option properly.
Fixed both required changes @miguelmiranda20
Looks good! Ready to merge