From 1f441489cedf6b505607f6d35cbb7ba13716e7b1 Mon Sep 17 00:00:00 2001 From: David Graham Date: Fri, 10 May 2024 21:44:27 -0400 Subject: [PATCH] save work --- .../manifest/services/emanifest_search.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 server/apps/manifest/services/emanifest_search.py diff --git a/server/apps/manifest/services/emanifest_search.py b/server/apps/manifest/services/emanifest_search.py new file mode 100644 index 00000000..64a71631 --- /dev/null +++ b/server/apps/manifest/services/emanifest_search.py @@ -0,0 +1,38 @@ +from typing import Literal, Optional + +EmanifestStatus = Literal[ + "Pending", + "scheduled", + "InTransit", + "ReadyForSignature", + "signed", + "SignedComplete", + "UnderCorrection", + "Corrected", +] + + +class EManifestSearch: + def __init__(self): + self.state_code = None + self.site_id = None + self.status: Optional[EmanifestStatus] = None + self.start_date = None + self.end_date = None + self.date_type = None + + # { + # "stateCode":"string", + # "siteId":"string", + # "status":"Pending|Scheduled|InTransit|ReadyForSignature|Signed| + # SignedComplete|UnderCorrection|Corrected", + # "dateType":"CertifiedDate|ReceivedDate|ShippedDate|UpdatedDate", + # "siteType":"Generator|Tsdf|Transporter|RejectionInfo_AlternateTsdf", + # "startDate":"date", + # "endDate":"date" + # "correctionRequestStatus":"NotSent|Sent|IndustryResponded|Cancelled + # } + + def add_state(self, state: str = None): + self.state = state if state else "Default State" + return self