add method to merge contacts

This commit is contained in:
2024-03-31 18:10:01 +02:00
parent 283bbb9a74
commit bf13860b40
3 changed files with 33 additions and 7 deletions
+5 -1
View File
@@ -18,7 +18,7 @@ class ContactPojo:
def __repr__(self):
return "phone:{}, passport:{}, last_name:{}, first_name:{}, mail:{}, store:{}, ip_country:{},isp:{}".format(
self.phone, self.passport, self.last_name, self.first_name, self.mail, self.store, self.ip_country,
self.isp)
self.isp)
def __init__(self, phone_number: str, passport_number: str, last_name: str, first_name: str, mail: str, store: str,
ip_country="FR"):
@@ -29,6 +29,10 @@ class ContactPojo:
self.mail = mail
self.store = store
self.ip_country = ip_country
self.ip_address = ""
def __hash__(self):
return hash(self.mail)
def to_firestore_dict(self):
dest = {