optimize local db
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
from pojo.captcha_error_contact_pojo import ContactInErrorPojo
|
||||
|
||||
|
||||
@dataclass
|
||||
class ContactPojo:
|
||||
@@ -35,6 +37,12 @@ class ContactPojo:
|
||||
|
||||
return dest
|
||||
|
||||
@staticmethod
|
||||
def get_contact_from_error_contact(errorContact: ContactInErrorPojo):
|
||||
return ContactPojo(phone_number=errorContact.phone, mail=errorContact.mail, ccid=errorContact.ccid,
|
||||
last_name=errorContact.last_name, first_name=errorContact.first_name,
|
||||
position=errorContact.position, passport_number=errorContact.passport)
|
||||
|
||||
@staticmethod
|
||||
def from_firestore_dict(source):
|
||||
ccid = source['ccid']
|
||||
|
||||
Reference in New Issue
Block a user