change error schema
This commit is contained in:
@@ -7,12 +7,13 @@ from pojo.contact_pojo import ContactPojo
|
||||
Base = declarative_base()
|
||||
|
||||
ERROR_TYPE_CAPTCHA = 1
|
||||
TOO_MANY_REQUEST_ERROR = 2
|
||||
|
||||
|
||||
class ContactInErrorPojo(Base):
|
||||
__tablename__ = "contacts_in_error"
|
||||
|
||||
mail: str = Column(String, primary_key=True)
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
mail: str = Column(String)
|
||||
phone: str = Column(String)
|
||||
passport: str = Column(String)
|
||||
last_name: str = Column(String)
|
||||
@@ -38,6 +39,6 @@ def get_captcha_error_contact_from_contact(contact: ContactPojo, error_type: int
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
conact = ContactPojo(mail="panleici3m@gmail.com", phone_number="649114592", ccid="", position=0,
|
||||
passport_number="3322111", first_name="Lei", last_name="PAAaN")
|
||||
definitions.local_db_manager.insert_or_update(get_captcha_error_contact_from_contact(conact, ERROR_TYPE_CAPTCHA))
|
||||
contact = ContactPojo(mail="panleici3m@gmail.com", phone_number="649114592", ccid="", position=0,
|
||||
passport_number="3322111", first_name="Lei", last_name="PAAaN")
|
||||
definitions.local_db_manager.insert_or_update(get_captcha_error_contact_from_contact(contact, ERROR_TYPE_CAPTCHA))
|
||||
|
||||
Reference in New Issue
Block a user