
    !+i                         d dl mZmZmZmZmZmZmZmZm	Z	m
Z
 d dlmZ d dlmZ  G d de      Z G d de      Z G d d	e      Z ed
ej$                          edej&                          edej&                         y)    )
ColumnIntegerStringBooleanDateTimeCheckConstraintIndexFloatTextJSON)func)Basec                      e Zd ZdZ eedd      Z e ed      dd      Z e ed      d	      Z	 e e
d
            Z e e
d
            Z eed	      Z eed	      Z ee      Z e e
d
            Z eed	      Z eed	      Z e e
d
            Z e e
d
       ej.                          ej.                               Zy)SyncControlsync_controlTprimary_keyindex2   F)uniquenullable   pendingdefaulttimezoner   )server_defaultonupdateN)__name__
__module____qualname____tablename__r   r   idr   entityinitial_load_statusr   initial_load_started_atinitial_load_completed_atinitial_load_total_recordsinitial_load_processed_recordsr   initial_load_checkpointlast_incremental_synclast_incremental_countr   webhook_enabledwebhook_last_receivedr   now
updated_at     =/var/www/hypershopcomercio.com.br/hyper-ai/app/models/sync.pyr   r      s    "M	T	6BF2Jte<F !Y?$Xt%<= &x'> ?!'!;%+GQ%?"$Tl #8T#:;#GQ7 We4O"8T#:;$/
U]UYU]U]U_`Jr3   r   c                      e Zd ZdZ eedd      Z e ed      d      Z e ed      d      Z	 e ed      d      Z
 e ed            Z e ed            Z eed	
      Z eed	
      Z eed	
      Z eed	
      Z e ed       ej&                               Z e ed            Z ee      Z ee      Z ee      Zy)SyncJob	sync_jobsTr   r   Fr   r   r   r   r   r   N)r    r!   r"   r#   r   r   r$   r   r%   job_typestatusr   	date_fromdate_torecords_foundrecords_createdrecords_updatedrecords_failedr   r0   
started_atfinished_atduration_msr   error_messager   error_detailsr2   r3   r4   r6   r6      s    M	T	6BF2J/FfRj51HF2J/F x./IXt,-G 7A.MWa0OWa0OGQ/N $/
KJ401K/K4LM4LMr3   r6   c                   <   e Zd ZdZ eedd      Z e ed      d      Z e ed      d      Z	 ee      Z
 ee      Z e ed      d	
      Z eed
      Z eed
      Z e ed            Z ee      Z e ed       ej(                               Zy)WebhookQueuewebhook_queueTr   d   Fr8      r   r   r   r      r   r9   N)r    r!   r"   r#   r   r   r$   r   topicresourceuser_idapplication_idr;   attemptsmax_attemptsr   processed_atr   rE   r   r0   received_atr2   r3   r4   rH   rH   6   s    #M	T	6B 6#;/EfSkE2HWoGG_N F2J	2Fgq)H'1-L (D12L4LM40LKr3   rH   idx_sync_jobs_entityidx_sync_jobs_statusidx_webhook_queue_statusN)
sqlalchemyr   r   r   r   r   r   r	   r
   r   r   sqlalchemy.sqlr   app.models.baser   r   r6   rH   r%   r;   r2   r3   r4   <module>r[      sm    l l l   a$ a0!d !2M4 M. gnn - gnn -  ,"5"5 6r3   