
    ?h                        S SK JrJr  S SKJr  S SKJr  S SKJr  S SKJ	r	J
r
JrJr  S SKJrJrJrJrJr  \" 5       r\R)                  S\	S9\" \R*                  5      4S	\
4S
 jj5       r\R/                  S\S9S SSSSSS\" \R*                  5      4S\S\S\\   S\\   S\\   S\\   S\\   4S jj5       r\R/                  S\	S9\" \R*                  5      4S\4S jj5       r\R)                  S\	S9\" \R*                  5      4S\S	\
4S jj5       r\R;                  S\	S9\" \R*                  5      4S\S\4S jj5       r\R?                  S\	S9\" \R*                  5      4S\4S jj5       r g)    )	APIRouterDepends)datetime)Optional)database)	IotDeviceIotDeviceCreateIotDeviceUpdateIotDeviceList)create_iot_device_serviceget_iot_device_serviceupdate_iot_device_servicedelete_iot_device_servicelist_iot_devices_service/)response_modeldevicec                 4   #    [        X5      I S h  vN $  N7fNr   )r   dbs     PC:\Suresh\moveshuttle\MDcreated\moveengine\app\v1\routers\platform\iotdevices.pycreate_iot_devicer           *66666   
   Nskiplimitqdevice_typestatus	date_fromdate_toc           
      :   #    [        XX#XEXg5      I S h  vN $  N7fr   )r   )r   r   r   r    r!   r"   r#   r   s           r   list_iot_devicesr%      s      *$qvZaffffs   z/{account_id}
account_idc                 4   #    [        X5      I S h  vN $  N7fr   )r   r&   r   s     r   get_iot_devicer)   "   s     '
7777r   c                 4   #    [        X5      I S h  vN $  N7fr   r   )r&   r   r   s      r   post_iot_devicer+   &   r   r   updatec                 6   #    [        XU5      I S h  vN $  N7fr   )r   )r&   r,   r   s      r   update_iot_devicer.   *   s     *:rBBBBs   c                 4   #    [        X5      I S h  vN $  N7fr   )r   r(   s     r   delete_iot_devicer0   .   s     *:::::r   )!fastapir   r   r   typingr   app.dbr   !app.v1.models.platform.iotdevicesr   r	   r
   r   #app.v1.services.platform.iotdevicesr   r   r   r   r   routerpostget_mongo_dbr   getintstrr%   r)   r+   putr.   deleter0        r   <module>r@      s   &      
S+8?@U@U8V 7O 7 ,7 C.!% #!x$$%
g

g
g }
g #	
g
 SM
g }
g c]
g /
g OI6-4X5J5J-K 8S 8 78 _Y7GNxOdOdGe 7c 7? 7 87 OI6IPQYQfQfIg C C_ C 7C y9078M8M0N ; ; :;r?   