[Invoices] - Create Database Interface File and Structure #116
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#116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Create the file that will hold all database interactions for the
invoicescollection. This isolates our database logic from the API endpoints.Tasks:
repositories/invoice_repo.pyorservices/invoice_service.py).InvoiceRepository).asyncmethods for CRUD operations:create_invoice(invoice_data: InvoiceCreate) -> Invoiceget_invoice_by_id(invoice_id: ObjectId) -> Invoice | Noneget_invoices_by_client_id(client_id: ObjectId) -> list[Invoice]get_invoices_by_workOrder_id(workOrder_id: ObjectId) -> list[Invoice]update_invoice(invoice_id: ObjectId, update_data: InvoiceUpdate) -> Invoice | Nonedelete_invoice(invoice_id: ObjectId) -> bool