o
    h>                  
   @   sb  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
 ddlmZ ddlmZ d dlmZ G d	d
 d
eZG dd deZG dd deZG dd deZG dd deZG dd deZededZG dd de
ee ZG dd deeZG dd deZG dd deZG dd  d eZG d!d" d"eZeeeeeeeeed#	Zd$efd%d&Z d'S )(    )datetime)	BaseModelField)OptionalListTypeVarGeneric)GenericModel   )
CommonBase)SaaSInvoices)Enumc                   @   s   e Zd ZU edddZeed< edddZeed< edddZ	eed	< ed
ddZ
ee ed< edddZeed< edddZeed< ed
ddZee ed< d
S )FeatureBase.zName of the feature)descriptionnameTz1Flag to indicate if the feature should be visibledisplayzURL for the featureurlNz'API URL for the feature (if applicable)apiurlzIcon identifier for the featureiconz3Category of the feature (e.g. 'saas' or 'platform')categoryzDescription of the featurer   )__name__
__module____qualname__r   r   str__annotations__r   boolr   r   r   r   r   r    r   r   3/var/www/html/moveengine/app/v1/models/crudmodel.pyr      s   
 r   c                   @   s.   e Zd ZU eed< dZee ed< eed< dS )DummyCitiesr   Nstatecountry)r   r   r   r   r   r   r   r   r   r   r   r      s   
 r   c                   @   sF   e Zd ZU eed< dZee ed< dZee ed< dZ	ee ed< dS )DVehicleCategoryr   Nrateunit	base_rate)
r   r   r   r   r   r"   r   floatr#   r$   r   r   r   r   r!      s
   
 r!   c                   @   sN   e Zd ZU eed< dZee ed< eed< dZee ed< dZ	ee ed< dS )DummyPriceTyper   Nstatuscurrencycitypricing_file)
r   r   r   r   r   r'   r   r)   intr*   r   r   r   r   r&   #   s   
 r&   c                   @   sN   e Zd ZU eed< eed< dZee ed< dZee ed< dZ	ee ed< dS )LocationsBaser   addressNlatitude	longitudetype)
r   r   r   r   r   r.   r   r%   r/   r0   r   r   r   r   r,   ,   s   
 r,   c                   @   s6   e Zd ZU dZee ed< eej	dZ
ee ed< dS )CommonUpdateNuser_id)default_factoryupdated_date)r   r   r   r2   r   r   r   r   r   utcnowr4   r   r   r   r   r1   4   s   
 r1   	ModelType)boundc                   @   s"   e Zd ZU eed< ee ed< dS )
CommonListtotal_countitemsN)r   r   r   r+   r   r   r6   r   r   r   r   r8   :   s   
 r8   c                   @   s   e Zd ZdZdZdZdS )StatusactiveinactivemaintenanceN)r   r   r   ACTIVEINACTIVEMAINTENANCEr   r   r   r   r;   >   s    r;   c                   @   *   e Zd ZU eed< eejdZeed< dS )	PriceTypepricing_typedefaultr'   N	r   r   r   r   r   r   r;   r?   r'   r   r   r   r   rC   D      
 rC   c                   @   rB   )Skillsr   rE   r'   NrG   r   r   r   r   rI   H   rH   rI   c                   @   rB   )	Checklistr   rE   r'   NrG   r   r   r   r   rJ   L   rH   rJ   c                   @   rB   )Addonsr   rE   r'   NrG   r   r   r   r   rK   P   rH   rK   )	featuresdummycitiesdummypricetypedummyvehiclecategorysaasinvoicespricing_typesskills	checklistaddonscollection_namec                 C   s*   t |  }|du rtd|  d|S )zy
    Resolve the collection name to a Pydantic model using the mapping.
    This function is called by your routers.
    NzModel for collection 'z' not found.)MODEL_MAPPINGgetlower
ValueError)rU   model_classr   r   r   get_model_for_collectionb   s   r[   N)!r   pydanticr   r   typingr   r   r   r   pydantic.genericsr	   	basemodelr   saas.subscriptionsr   enumr   r   r   r!   r&   r,   r1   r6   r8   r   r;   rC   rI   rJ   rK   rV   r[   r   r   r   r   <module>   s>    	