o
    Ah                     @   sh  d dl mZmZmZ d dlmZ d dlmZmZ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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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G d(d) d)eZd*S )+    )	BaseModelField	validator)datetime)ListOptionalDictc                   @   s  e Zd ZU 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d< 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d< edddZeed< eeddZee ed< eeddZee ed< eed dZee ed!< eed"dZee ed#< eejd$dZeed%< eejd&dZeed'< dS )(Service
service_id.Identifier for the accountdescription
account_idIdentifier for the useruser_idNz!Parent service identifier, if any	parent_idzTitle of the serviceservice_titlez#Detailed description of the serviceservice_descriptionz!Maximum number of concurrent jobscapacity_jobsz&Indicates if the service is chargeablehas_costz!URL or path for the service imageimagezURL or path for the map iconmap_iconz.Status of the service (e.g., active, inactive)statusz&True if the service is vehicle focusedis_vehicle_focusedzInput form variablesdefault_factoryr   input_variableszAdditional optional variablesinput_addonszChecklist variables	checklistzSkills variablesskillsCreation timestampcreated_dateLast updated timestampupdated_date)__name__
__module____qualname__int__annotations__r   r   strr   r   r   r   r   r   r   boolr   r   r   r   listr   r   r   r   r   r   utcnowr!   r#    r-   r-   ;/var/www/html/moveengine/app/v1/models/platform/services.pyr	      s&   
 r	   c                   @   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d
< 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eddZee ed< eejddZeed< eejddZeed< dS )PricingRule.r   r   r   r   r   zRule identifier	rule_namez*Pricing type (e.g., fixed, time, distance)pricing_typezFixed base cost	base_costzVariable cost per unitratez#Unit for pricing (e.g., minute, km)unitz&Conditions or tags (e.g., night, peak)r   
conditionsr    r!   r"   r#   N)r$   r%   r&   r   r   r)   r(   r   r0   r1   r2   floatr3   r4   r+   r5   r   r   r,   r!   r#   r-   r-   r-   r.   r/      s   
 r/   c                   @   st   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e	j
d	d
Ze	ed< edddZeed< dS )PricingType.r   r   r   r   r   zPricing type valuer1   r    r   created_datetimez+Status (e.g., active, inactive, deprecated)r   N)r$   r%   r&   r   r   r)   r(   r   r1   r   r,   r8   r   r-   r-   r-   r.   r7   &   s   
 r7   c                   @   s   e Zd ZU eed< eed< ee ed< ee ed< ee ed< eed< eed< eed< d	Zee ed
< d	Z	ee ed< d	Z
ee ed< eddddddd Zd	S )WorkforceBaser   r   r   addonsr   r   r   r   Nr   r   r   T)prec                 C   s"   t |trdd |dD S |S )Nc                 S   s   g | ]
}|  r|  qS r-   )strip).0itemr-   r-   r.   
<listcomp>@   s    z?WorkforceBase.parse_comma_separated_strings.<locals>.<listcomp>,)
isinstancer)   splitclsvr-   r-   r.   parse_comma_separated_strings=   s   
z+WorkforceBase.parse_comma_separated_strings)r$   r%   r&   r)   r(   r   r'   r   r   r   r   r   rF   r-   r-   r-   r.   r9   0   s   
 r9   c                   @   s.   e Zd ZU dZee ed< dZee ed< dS )WorkforceUpdateBaseNnamemobile)r$   r%   r&   rH   r   r)   r(   rI   r-   r-   r-   r.   rG   C   s   
 rG   c                   @   s"   e Zd ZU dZdZee ed< dS )	WorkforcezLA complete Workforce model that can be extended with extra fields if needed.Nr   )r$   r%   r&   __doc__r   r   r)   r(   r-   r-   r-   r.   rJ   J   s   
 rJ   c                   @   s   e Zd ZU dZee ed< dZee ed< dZee ed< dZ	ee
 ed< dZee ed< dZee ed< dZee
 ed< dZee ed	< ee ed
< g Zeee  ed< dZee ed< dZee ed< dZee ed< dZee ed< edddd ZdS )WorkforceCreateNr   r   r
   s_idr   r   r   r   dynamicFieldscategory_inputsr   r   r   r   r   r:   c                 C   s   |st d|S )Nz#At least one skill must be selected)
ValueErrorrC   r-   r-   r.   validate_skills]   s   zWorkforceCreate.validate_skills)r$   r%   r&   r   r   r)   r(   r   r
   rM   r'   r   r   r   r   r*   r   r   rO   r   r   r   r   r   rQ   r-   r-   r-   r.   rL   N   s"   
 rL   c                   @   s   e Zd ZU dZee ed< dZee ed< dZee ed< dZ	ee ed< dZ
ee ed< dZee ed< dZee ed< dZee ed	< eejd
Zee ed< dZee ed< dZee ed< dS )WorkforceUpdateNr   r   r0   r1   r2   r3   r4   r5   )r   last_updatedr   r   )r$   r%   r&   r   r   r)   r(   r   r0   r1   r2   r6   r3   r4   r5   r   r   r,   rS   r   r   r-   r-   r-   r.   rR   c   s   
 rR   c                   @   sN  e Zd ZU dZee ed< dZee ed< dZee ed< dZ	ee ed< dZ
ee ed< dZee ed< dZee ed< dZee ed	< dZee ed
< dZee ed< dZee ed< dZee ed< dZee ed< dZee ed< dZee ed< dZee ed< dZee ed< g Zee ed< g Zee ed< g Zee ed< dS )WorkforceListNr   idr   r
   rM   r   r   r   r   r   r   r   r   r   r   r!   
last_loginr   r   r:   )r$   r%   r&   r   r   r)   r(   rU   r   r
   rM   r'   r   r   r   r   r*   r   r   r   r   r   r   r!   r   rV   r   r   r   r:   r-   r-   r-   r.   rT   p   s*   
 rT   c                   @   s"   e Zd ZU eed< ee ed< dS )
Workforcestotal_countusersN)r$   r%   r&   r'   r(   r   rT   r-   r-   r-   r.   rW      s   
 rW   c                   @   >   e Zd ZU dZee ed< dZee ed< dZee ed< dS )	CheckListNr   r   rH   	r$   r%   r&   r   r   r)   r(   r   rH   r-   r-   r-   r.   r[         
 r[   c                   @      e Zd ZU ee ed< dS )CheckListSelectrY   N)r$   r%   r&   r   r[   r(   r-   r-   r-   r.   r_         
 r_   c                   @   rZ   )	AddonListNr   r   rH   r\   r-   r-   r-   r.   ra      r]   ra   c                   @   r^   )AddonsSelectrY   N)r$   r%   r&   r   ra   r(   r-   r-   r-   r.   rb      r`   rb   c                   @   rZ   )
SkillsListNr   r   rH   r\   r-   r-   r-   r.   rc      r]   rc   c                   @   r^   )SkillsListSelectrY   N)r$   r%   r&   r   rc   r(   r-   r-   r-   r.   rd      r`   rd   c                   @   rZ   )ServiceCatListNr   r   service_category)	r$   r%   r&   r   r   r)   r(   r   rf   r-   r-   r-   r.   re      r]   re   c                   @   r^   )ServiceCategorySelectrY   N)r$   r%   r&   r   re   r(   r-   r-   r-   r.   rg      r`   rg   c                   @   r^   )SubServiceSelectrY   N)r$   r%   r&   r   rT   r(   r-   r-   r-   r.   rh      r`   rh   N)pydanticr   r   r   r   typingr   r   r   r	   r/   r7   r9   rG   rJ   rL   rR   rT   rW   r[   r_   ra   rb   rc   rd   re   rg   rh   r-   r-   r-   r.   <module>   s,   
