24 lines
512 B
Python
24 lines
512 B
Python
class SimInfoPojo:
|
|
phone: str
|
|
ccid: str
|
|
|
|
def __init__(self, phone: str, ccid: str):
|
|
self.phone = phone
|
|
self.ccid = ccid
|
|
|
|
@staticmethod
|
|
def from_firestore_dict(source):
|
|
phone = source['phone']
|
|
ccid = source['ccid']
|
|
result = SimInfoPojo(phone=phone, ccid=ccid)
|
|
result.id = id
|
|
return result
|
|
|
|
def to_firestore_dict(self):
|
|
dest = {
|
|
u'phone': self.phone,
|
|
u'ccid': self.ccid,
|
|
}
|
|
|
|
return dest
|