
    u(i                     V    d dl 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y)    )ColumnIntegerStringDateTimeBooleanTextJSON)func)Basec                   R   e Zd ZdZdZ eedd      Z e ed      dd      Z	 e ed      dd      Z
 e ed	      d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	      d      Z e ed       ej&                         d      Z e ed      d      Z eed      Z eed      Z eed      Z e ed       ej&                         d      Z e ed       ej&                          ej&                         d      Zd Zy)
CronJobLogz1Unified model for logging all cron job executionscron_job_logsT)primary_keyindexd   F)nullabler      2   started)r   defaultr   )r   )timezone)server_defaultr   )r   onupdater   c           	      p    d| j                    d| j                   d| j                   d| j                   d	S )Nz<CronJobLog(id=z, task_type=z	, status=z, started_at=z)>)id	task_typestatus
started_at)selfs    M/var/www/html/hubwallet-dev/src/smart_inventory/apps/inventory/cron_models.py__repr__zCronJobLog.__repr__#   s:     	dnn5EYt{{m[himixixhyy{||    N)__name__
__module____qualname____doc____tablename__r   r   r   r   r   task_idr   processed_countinserted_countupdated_countrows_insertedtarget_dater   r
   nowr   completed_atduration_secondsr   error_messager	   task_result
created_at
updated_atr!    r"   r    r   r      s=   ;#M	T	6Bvc{U$?IVC[4t<GF2J	BF WtQ?OGdA>N7T1=M7T1=Md3K $/
UZ[J(D1DALg5 4$/M-K $/
UZ[J$/
U]UYU]U]U_jopJ}r"   r   N)
sqlalchemyr   r   r   r   r   r   r	   sqlalchemy.sqlr
   src.utils.dbr   r   r5   r"   r    <module>r9      s"    M M M  } }r"   