supports lookup by domains
This commit is contained in:
@@ -69,7 +69,8 @@ class ProjectModel:
|
||||
project_name: str = "",
|
||||
project_url: str = "",
|
||||
property_contacts: Dict[str, Any] = None,
|
||||
viewing_emails: List[str] = None
|
||||
viewing_emails: List[str] = None,
|
||||
viewing_domains: List[str] = None
|
||||
):
|
||||
|
||||
self.client = client
|
||||
@@ -127,6 +128,7 @@ class ProjectModel:
|
||||
self.project_url = project_url
|
||||
self.property_contacts = property_contacts or {}
|
||||
self.viewing_emails = viewing_emails or []
|
||||
self.viewing_domains = viewing_domains or []
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Convert the ProjectModel to a dictionary for Firestore storage."""
|
||||
@@ -185,7 +187,8 @@ class ProjectModel:
|
||||
"ProjectName": self.project_name,
|
||||
"ProjectUrl": self.project_url,
|
||||
"property_contacts": self.property_contacts,
|
||||
"viewing_emails": self.viewing_emails
|
||||
"viewing_emails": self.viewing_emails,
|
||||
"viewing_domains": self.viewing_domains
|
||||
}
|
||||
|
||||
@classmethod
|
||||
@@ -246,5 +249,6 @@ class ProjectModel:
|
||||
project_name=data.get("ProjectName", ""),
|
||||
project_url=data.get("ProjectUrl", ""),
|
||||
property_contacts=data.get("property_contacts", {}),
|
||||
viewing_emails=data.get("viewing_emails", [])
|
||||
viewing_emails=data.get("viewing_emails", []),
|
||||
viewing_domains=data.get("viewing_domains", [])
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user