
    ~
i                         d dl m Z  d dlmZmZ d dlmZmZmZmZ d dl	m
Z
mZmZmZ d dlmZ  G d de      Z G d d	e      Zy
)    )datetime)	BaseModelField)Mappedmapped_columnrelationshipSession)DateTimeInteger
ForeignKeyfunc)Basec                   R    e Zd ZU  ed      Zedz  ed<    ed      Zedz  ed<   y)CategorySimulationBaseN)default
cat_sim_idcategory_id)__name__
__module____qualname__r   r   int__annotations__r        J/var/www/html/retail-simulation-api/app/models/main/category_simulation.pyr   r      s(    #D1Jt1$T2K#*2r   r   c                      e Zd ZU dZ ededd      Zee   e	d<    ed e
d            Zee   e	d<    e e
d            Zee   e	d<    ed	 ed
       ej                         d      Zee   e	d	<    ed ed
       ej                          ej                         d      Zee   e	d<    edd      Z edd      Zedededd fd       Zy)TblCategorySimulationtbl_category_simulationr   T)primary_keyautoincrementr   ztbl_master.master_idztbl_simulation.simulation_idsimulation_id
created_at)timezoneF)server_defaultnullable
updated_at)r$   onupdater%   	TblMastercategory_simulation)back_populatesTblSimulationdatadbreturnc                 t     | di |j                         }|j                  |       |j                          |S )Nr   )
model_dumpaddflush)clsr,   r-   create_datas       r   createzTblCategorySimulation.create   s1    .DOO-.
{

r   N)r   r   r   __tablename__r   r   r   r   r   r   r   r   r!   r
   r   nowr"   r   r&   r   master
simulationclassmethodr   r	   r5   r   r   r   r   r      s.   ,M,\7PTdhiJi -mZH^=_ `K&+`!.z:X/Y!ZM6#;Z$1,RV@Whphlhphphr  ~C  %DJ!  D$1,RV@Whphlhphphr  ~F  ~B  ~F  ~F  ~H  SX  %YJ!  Y+6KLFo>STJ / G ?V  r   r   N)r   pydanticr   r   sqlalchemy.ormr   r   r   r	   
sqlalchemyr
   r   r   r   app.models.base_classr   r   r   r   r   r   <module>r?      s2     % G G : : &3Y 3D r   