Skip to main content

PartPurchaseModel

Version: v2.0.0

Stored entity

Partition key pk, sort key sk • discriminator type = "PART_PURCHASE"

Overview​

PartPurchase model

Fields​

FieldTypeRequiredDefaultDescription
pkstr✅——
skstr✅——
created_atstr✅——
updated_atstr✅——
typestr❌PART_PURCHASE—
tenant_idstr✅——
part_purchase_idstr✅——
part_purchase_display_idstr✅——
contactstr✅——
contact_idstr✅——
arrival_datestr❌——
arrival_statusstr❌——
referencestr❌——
courierstr❌——
courier_idstr❌——
tracking_numberstr❌——
line_item_tax_typestr✅——
line_itemsList[LineItem]✅——
sub_totalfloat✅——
total_taxfloat✅——
total_expensesfloat✅——
totalfloat✅——
amount_paidfloat✅——
amount_duefloat✅——
payment_statusstr✅——

Embedded models​

Models embedded in the fields above — shown inline; they have no separate page.

LineItem — v1.0.0
FieldTypeRequiredDefaultDescription
line_item_idstr❌——
part_idstr✅——
tag_idstr✅——
arrival_statusbool❌False—
quantityint✅——
unit_costfloat✅——
tax_typestr✅——
tax_amountfloat✅——
expensesfloat✅——
actual_unit_costfloat✅——
actual_totalfloat✅——
line_amountfloat✅——
part_typestr✅——
part_type_idstr✅——
part_numberstr❌——

Change history

  • v1.0.0 · 2025-04-22 · Cian (shared account) · Initial version. (71ac3af7c)

APIs / Triggers​

TriggerEndpoint / SourceDetailHandler
StreamDynamoDB streamtable items where type = PART_PURCHASEsrc/purchases/part_purchases_opensearch_sync.py
APIPOST /newpartPurchases/—src/purchases/part_purchases_post.py
APIPOST /newpartPurchases/search—src/purchases/part_purchases_search.py
APIPOST /newpartPurchases/searchFilters—src/purchases/part_purchases_search_filters.py
EventEventBridgePartPurchasesSelfHealRequestedsrc/part_purchases_self_heal.py

Change history​

v2.0.0 · 2025-04-22 · Cian (shared account) · 71ac3af7c

detatch

  • Removed field amount_paid_for_parts (breaking).
  • Removed field contact_name (breaking).
  • Removed field expenses (breaking).
  • Removed field last_sent_at (breaking).
  • Removed field line_amount_tax_type (breaking).
  • Removed field tracking_numbers (breaking).
  • Added required field contact.
  • Added optional field courier_id.
  • Added required field line_item_tax_type.
  • Added required field total_expenses.
  • Added optional field tracking_number.
  • Field amount_due type changed: Decimal → float (breaking).
  • Field amount_paid type changed: Decimal → float (breaking).
  • Field amount_paid became required (breaking).
  • Field amount_paid default changed: Decimal(0) → None.
  • Field arrival_status type changed: str → Optional[str] (breaking).
  • Field arrival_status default changed: 'NOT_ARRIVED' → None.
  • Field created_at became required (breaking).
  • Field created_at default changed: datetime.utcnow().isoformat() → None.
  • Field line_items type changed: list → List[LineItem] (breaking).
  • Field payment_status became required (breaking).
  • Field payment_status default changed: 'NOT_PAID' → None.
  • Field sub_total type changed: Decimal → float (breaking).
  • Field total type changed: Decimal → float (breaking).
  • Field total_tax type changed: Decimal → float (breaking).
  • Field type became optional.
  • Field type default changed: None → 'PART_PURCHASE'.
  • Field updated_at became required (breaking).
  • Field updated_at default changed: datetime.utcnow().isoformat() → None.
v1.0.0 · 2025-03-15 · Olaniyi Ajayi · 338416124

fx

  • Initial version.

Generated from dismantly-backend/Microservices/PartPurchases/dependencies/models.py. Do not edit by hand.

Models last synced: 2026-06-23 13:21 UTC