diff --git a/backend/app/db/models/hubspot_deal_data.py b/backend/app/db/models/hubspot_deal_data.py index 5104f377..caf1df5d 100644 --- a/backend/app/db/models/hubspot_deal_data.py +++ b/backend/app/db/models/hubspot_deal_data.py @@ -86,6 +86,7 @@ class HubspotDealData(SQLModel, table=True): last_contact_date: Optional[datetime] = Field(default=None) last_outbound_call: Optional[datetime] = Field(default=None) last_outbound_email: Optional[datetime] = Field(default=None) + last_submission_date: Optional[datetime] = Field(default=None) created_at: Optional[datetime] = Field( sa_column=Column( diff --git a/etl/hubspot/hubspotClient.py b/etl/hubspot/hubspotClient.py index 482ae460..28abf303 100644 --- a/etl/hubspot/hubspotClient.py +++ b/etl/hubspot/hubspotClient.py @@ -351,6 +351,7 @@ class HubspotClient: "last_contact_date", "last_outbound_call", "last_outbound_email", + "last_submission_date", ], ) ) diff --git a/etl/hubspot/hubspotDataTodB.py b/etl/hubspot/hubspotDataTodB.py index 042571da..ae2daa49 100644 --- a/etl/hubspot/hubspotDataTodB.py +++ b/etl/hubspot/hubspotDataTodB.py @@ -297,6 +297,9 @@ class HubspotDataToDb: "last_contact_date": parse_hs_date(deal_data.get("last_contact_date")), "last_outbound_call": parse_hs_date(deal_data.get("last_outbound_call")), "last_outbound_email": parse_hs_date(deal_data.get("last_outbound_email")), + "last_submission_date": parse_hs_date( + deal_data.get("last_submission_date") + ), }.items(): setattr(existing, attr, value) @@ -399,6 +402,7 @@ class HubspotDataToDb: last_contact_date=parse_hs_date(deal_data.get("last_contact_date")), last_outbound_call=parse_hs_date(deal_data.get("last_outbound_call")), last_outbound_email=parse_hs_date(deal_data.get("last_outbound_email")), + last_submission_date=parse_hs_date(deal_data.get("last_submission_date")), ) def _handle_existing_photo_upload( diff --git a/etl/hubspot/hubspot_deal_differ.py b/etl/hubspot/hubspot_deal_differ.py index 40eef059..6d49cf59 100644 --- a/etl/hubspot/hubspot_deal_differ.py +++ b/etl/hubspot/hubspot_deal_differ.py @@ -118,6 +118,7 @@ class HubspotDealDiffer: ("last_contact_date", "last_contact_date"), ("last_outbound_call", "last_outbound_call"), ("last_outbound_email", "last_outbound_email"), + ("last_submission_date", "last_submission_date"), ] for hs_field, db_field in date_fields: