
    jWi                         d dl m Z  d dlmZmZmZmZmZmZ d dlZd dl	m
Z
  G d deej                  Z G d de
          ZdS )	    )datetime)ColumnIntegerStringFloatDateTimeEnumN)Basec                       e Zd ZdZdZdZdS )
PeriodTypeDAILYWEEKLYMONTHLYN)__name__
__module____qualname__r   r   r        >/var/www/html/crypto-bot/backend/app/models/performance_log.pyr   r      s        EFGGGr   r   c                      e Zd ZdZ eeddd          Z e ee          d          Z	 ee
d          Z ee
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          d          Z e ed	          d          Z ee
dej                  Zd
efdZdS )PerformanceLogperformance_logsT)primary_keyindexautoincrementF)nullabler   )r   default   d   returnc                    | j         | j        | j        r| j                                        nd | j        r| j                                        nd | j        | j        | j        | j        | j	        | j
        | j        | j        | j        dS )N)idperiod_typeperiod_start
period_endtotal_tradeswin_rate	total_pnlmax_drawdownsharpe_ratioprofit_factor
expectancypairstrategy_name)r"   r#   r$   	isoformatr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   )selfs    r   to_dictzPerformanceLog.to_dict    s    '+=A=NXD-77999TX9=R$/33555d - - -!//I!/
 
 	
r   N)r   r   r   __tablename__r   r   r"   r	   r   r#   r   r$   r%   r&   r   r'   r(   r)   r*   r+   r,   r   r-   r.   r   utcnow
created_atdictr1   r   r   r   r   r      sp       &M	TT	J	J	JB&j))E:::K6(U333L5111J6'E1===Lved+++Hut,,,I6%$///L6%$///LF54000M---J6&&**t,,,DF66#;;666M5(/JJJJ
 
 
 
 
 
 
r   r   )r   
sqlalchemyr   r   r   r   r   r	   enumapp.databaser
   strr   r   r   r   r   <module>r:      s          E E E E E E E E E E E E E E E E           di   "
 "
 "
 "
 "
T "
 "
 "
 "
 "
r   