3
؀h                 @   sB   d dl m Z  d dlZd dlmZ d dlmZ G dd dejZdS )    )datetimeN)db)get_currencyc               @   s$  e Zd ZdZejejddZejejddddZ	ejejdZ
ejejdZejejdZejejdZejejddZejejdZejejdZejejddZejejddd	Zejejdd
ddZejejddZejejZejejZdddZdd Zdd ZdS )VehicleZvehicle_charges_newT)primary_key   )uniqueindex
      )nullable)r	   1)defaultr	   Nc             C   sX   || _ || _|| _|| _|| _|| _|| _|| _|	| _|
| _	|| _
|| _|| _|| _d S )N)vehicle_charge_public_idvehicle_charge_income_codevehicle_charge_outlet_codevehicle_charge_dept_codevehicle_charge_categoryvehicle_charge_category_costvehicle_charge_cost_currencyvehicle_charge_descriptionmaximum_number
session_idstatusdeletion_marker
created_at
updated_at)selfr   r   r   r   r   r   r   r   r   r   r   r   r   r    r   (/booking_service/app/database/vehicle.py__init__   s    zVehicle.__init__c             C   s
   d| j  S )Nz<Vehicle %r>)r   )r   r   r   r   __repr__1   s    zVehicle.__repr__c             C   sX   t jtj| j}| j| j| j| j| j	t
| j| j| jdd d| j|j d d d dS )Nr   datacurrency_name)r   r   r   r   r   r   Zvehicle_charge_cost_currency_idr   ZdiscountZdiscount_reasonZvehiclesZ
max_numberr   )requestsgetr   formatr   r   r   r   r   r   floatr   r   r   json)r   currencyr   r   r   return_json5   s    zVehicle.return_json)NNNNNNNNNNNNNN)__name__
__module____qualname____tablename__r   ColumnIntegerZvehicle_charge_idStringr   r   r   r   r   Floatr   r   r   r   r   r   r   DateTimer   r   r    r!   r*   r   r   r   r   r   	   s.       
r   )r   r$   routesr   	variablesr   Modelr   r   r   r   r   <module>   s   