
    iT                     6    d Z ddlmZ ddlmZ  G d de      Zy)z-
Portfolio model for worker project showcase
   )db   )	BaseModelc                   t   e Zd ZdZdZ ej                  ej                   ej                  d      d      Z	 ej                   ej                  d      d      Z ej                  ej                        Z ej                   ej                  d      d      Z ej                   ej                  d            Z ej                  ej                   ej                  d	      d
      Z ej                  ej                  d      Z ej$                  dd      Z ej$                  dd      Zd Zd Zy)PortfolioItemz4Worker portfolio items - showcase completed projectsportfolio_itemszusers.idF)nullable   i  d   zcontracts.idT    )defaultUser)backrefContractc           
      
   | j                   | j                  | j                  | j                  | j                  | j
                  | j                  | j                  | j                  r| j                  j                         d	S d d	S )N)	id	worker_idtitledescription	image_urltrade_categorycontract_iddisplay_order
created_at)
r   r   r   r   r   r   r   r   r   	isoformatselfs    app/models/portfolio.pyto_dictzPortfolioItem.to_dict   ss    ''ZZ++"11++!//9=$//335

 
	
 OS

 
	
    c                 <    d| j                    d| j                   dS )Nz<PortfolioItem z: >)r   r   r   s    r   __repr__zPortfolioItem.__repr__%   s     	DJJ<q99r    N)__name__
__module____qualname____doc____tablename__r   ColumnInteger
ForeignKeyr   Stringr   Textr   r   r   r   r   relationshipworkercontractr   r#    r    r   r   r      s    >%M		"**mbmmJ&?%PIBIIibiinu5E"))BGG$K		)"))C.59IRYYyryy~.N"))BJJn(EPTUKBIIbjj!4M R__V->?Frz3DEH
:r    r   N)r'   
extensionsr   baser   r   r1   r    r   <module>r4      s     :I :r    