optimize local db

This commit is contained in:
2022-06-08 21:39:45 +02:00
parent 80d362b174
commit 20c84b2a14
9 changed files with 95 additions and 56 deletions
+15
View File
@@ -1,6 +1,9 @@
import random
import string
from pojo.captcha_error_contact_pojo import ContactInErrorPojo
from pojo.contact_pojo import ContactPojo
letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'P', 'Q', 'R', 'S', 'T', '1', '2', '3', '4', '5', '6', '7',
'8', '9']
@@ -19,6 +22,18 @@ def get_random_passport_id_number() -> str:
return id_number
def get_captcha_error_contact_from_contact(contact: ContactPojo, error_type: int) -> ContactInErrorPojo:
captcha_error = ContactInErrorPojo()
captcha_error.mail = contact.mail
captcha_error.ccid = contact.ccid
captcha_error.phone = contact.phone
captcha_error.passport = contact.passport
captcha_error.first_name = contact.first_name
captcha_error.last_name = contact.last_name
captcha_error.position = contact.position
captcha_error.error_type = error_type
return captcha_error
if __name__ == '__main__':
# for i in range(1,200):
# print(get_random_id_number())