
    fei0                        d dl m Z  d dlmZmZ d dlmZmZ d dlmZ d dl	m
Z
mZ d dlmZ d dlmZ d dlmZmZ d d	lmZ  G d
 de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zy)    )datetime)ListOptional)Field
ConfigDict)UserResponseSchema)AddressSchema
BaseSchema)FileResponseSchema)MerchantSchema)BusinessCategoriesBusinessTypes)CustomerContactSchemac                       e Zd ZU dZ edd      Zeed<    edd      Zeed<    edd	
      Z	eed<    edd
      Z
eed<    edd
      Zeed<    edd
      Zee   ed<    edd      Zeed<   y)PhoneLookupResponseDataSchemaz&Schema for phone lookup response data..zCountry code (e.g., US)descriptioncountry_codezPhone number in national formatnational_format z	City namedefaultr   cityzState/provincestatezAlternative carrier namealtspid_carrier_nameNzCarrier namecarrierz!Whether the phone number is validvalid_number)__name__
__module____qualname____doc__r   r   str__annotations__r   r   r   r   r   r   r   bool     Z/var/www/html/hwPaymentPortal-be-uat/backend/src/apps/customers/schemas/customer_common.pyr   r      s    0c/HIL#I 2STOSTbk:D#:r/?@E3@ %b>X Y#Y"4^LGXc]Ls0STL$Tr&   r   c                       e Zd ZU dZ edd      Zeed<    edd      Ze	ed	<    ed
d      Z
eed<    edd      Zeed<   y)PhoneLookupResponseSchemaz!Schema for phone lookup response..zPhone lookup datar   data   zHTTP status coder   status_codeTz"Whether the request was successfulsuccessz
Phone datazResponse messagemessageN)r   r   r    r!   r   r*   r   r#   r,   intr-   r$   r.   r"   r%   r&   r'   r)   r)      sN    +*/AT*UD
'US6HIKI$4XYGTY;MNGSNr&   r)   c                   d   e Zd ZU  ed      Z edd      Zee   e	d<    edd      Z
ee   e	d<    edd	      Zee   e	d
<    edd      Zee   e	d<    edd      Zee   e	d<    edd      Zee   e	d<    edd      Zee   e	d<    edd      Zee   e	d<    edd      Zee   e	d<   y)CustomerBaseTfrom_attributesNz:UIN of Customer, inclusive of alphanumeric characters onlyr   uinzAccount type of customeraccount_typezIndustry type of customerindustryz2Official contact of customer. A valid phone numberoffice_phonezAccount Expiry dateaccount_expires_onzSelected timezone of customertimezonezWebsite of customerwebsitezTax Id of customeraccount_tax_idziPublic-facing account number (15 characters) - this is what users see instead of the internal customer_idaccount_literal)r   r   r    r   model_configr   r4   r   r"   r#   r5   r   r6   r7   r8   r   r9   r:   r;   r<   r%   r&   r'   r1   r1   #   s    d3LPC#  -2.-L(=)  $D>YZHhsmZ"'H#L(3-  .34Mb-c*c#D>]^Hhsm^"4=RSGXc]S$)$DX$YNHSMY%*&OXc] r&   r1   c                      e Zd ZU  eddddi dddddd	d
ddddddddddddddddddddddgdd d!d"d#d$d%d&d'd(d)d*d+ddd,
gd-d$d.d/d0d1d2d3dd4gii5      Z ed6d78      Zee   e	d<    ed9:      Z
ee	d<    ed6d;8      Zee   e	d<    ed6d<8      Zee   e	d<    ed6d=8      Zee   e	d<    ed6d>8      Zee   e	d!<    ed6d?8      Zee   e	d@<    ed6dA8      Zee   e	dB<    ed6dCd#D      Zeee      e	dE<    ed6dFdGD      Zeee      e	d<    ed6dH8      Zeee      e	d-<    ed6dI8      Zee   e	d<    ed6dJ8      Zee   e	d<    ed6dK8      Zee   e	dL<    ed6dM8      Zee   e	dN<    ed6dO8      Z ee   e	dP<    ed6dQ8      Z!ee   e	dR<    ed6dS8      Z"ee   e	dT<    ed6dU8      Z#eee      e	dV<    ed6dW8      Z$ee   e	d
<    ed6dX8      Z%ee   e	dY<    ed6dZ8      Z&ee   e	d<    ed6d[8      Z'ee   e	d<    ed6d\8      Z(ee   e	d<    ed6d]8      Z)ee   e	d^<    ed6d_8      Z*ee   e	d<    ed6d`8      Z+ee   e	da<   y6)bCustomerSchemaTFexampleid{   customer_idcus_1234567890abcdef	tilled_idtill_abc123def456
first_nameJohn	last_nameDoeemailzjohn.doe@example.comphonez+1234567890business_legal_namezDoe Industries LLCcustomer_typezBusiness Customer	is_vendor	is_activer<   ACC123456789012r9   zAmerica/New_Yorktagspremiumb2b
created_atz2024-01-15T10:30:00Z
updated_atz2024-01-20T14:25:00Z	addresses   z123 Business Avenuez	Suite 400zNew YorkNY10001USbilling)
rA   address_line_1address_line_2r   r   zipcodecountryaddress_typeuse_as_defaultrP   contactscon_abcd1234efgh5678JaneSmithzjane.smith@example.comz+1555123456zAccount Manager)rA   
contact_idrG   rI   rK   account_phonetitlerP   r3   populate_by_nameby_aliasjson_schema_extraNId of Customer resourcer   <Unique id of customer, typically attains the form 'cus_xxx' r   Unique tilled id of customerJActivation status of Customer, false denotes that the Customer is inactive'Created date and time as unix timestamp'Updated date and time as unix timestamp'Deleted date and time as unix timestamp
deleted_at$Profile picture / avatar of customeravatar#Customer's available addresses listr   r   aliasaddresszTags of customer	tags_list"Customer's available contacts listIs this customer a vendor?"Type of customer (customer/vendor))Is this customer registered with fluxpay?is_registered#Registered account of this customeruser_account Default Address of this customerdefault_addressz Billing Address of this customerbilling_addressz!Shipping Address of this customershipping_addressz#Attatch Multiple files for customerattachmentsFirst name of the customerMiddle name of the customermiddle_nameLast name of the customerEmail address of the customerPhone Number of the customerOffice Phone of the customerr7   Legal name of the businessLast activity datelast_active_date),r   r   r    r   r=   r   rA   r   r/   r#   rC   r"   rE   rP   r$   rU   r   rV   ru   rw   r   r{   r   r	   rR   rc   r   rO   rN   r   r   r   r   r   r   r   rG   r   rI   rK   rL   r7   rM   r   r%   r&   r'   r?   r?   =   s.    +c+5+ 0+ f	+
 U+ /+ + &';+  !4+ U+ T+ "#4+ .+ E*+ 4+  4!+" *?*5 *!%#*#'(1*.%)#+> &<&,%,!9)6!2%)	?+-
	2Lh d8QRBRRK   %T?]^Ix}^ %`!Ix~  &+=&J"  &+=&J"  &+=&J"  ,1:,FH'(  .39.GXd=)* 
 !&&!D(49
 
 7<87Hht123  !&d@\ ]Ix~]#(Cg#hM8C=h$)?%M8D>  2792L(-.  0560OXm,  0560OXm,  1671h}-  7<97K$123  !&d@\ ]J]!&tA^!_K#_$T?Z[Ix}[ ;Z[E8C=[ ;YZE8C=Z"'B`"aL(3-a).tIe)f#f+0K_+`hx(`r&   r?   c                      e Zd ZU  edddddddddd	d
dddddddddi      Z edd      Zee   e	d<    ed      Z
ee	d<    edd      Zee   e	d<    edd      Zee   e	d<    edd      Zee   e	d<    edd       Zee   e	d!<    edd"      Zee   e	d#<    edd$      Zee   e	d%<    edd&      Zee   e	d'<    edd(d)*      Zeee      e	d+<    edd,      Zee   e	d-<    edd.      Zeee      e	d/<    edd0      Zee   e	d1<    edd2      Zee   e	d3<    edd4      Zee   e	d5<    edd6      Z ee!   e	d7<    edd8      Z"ee   e	d9<    edd:      Z#ee   e	d;<    edd<      Z$ee   e	d=<    edd>      Z%ee   e	d?<    edd@      Z&ee   e	dA<    eddB      Z'ee   e	dC<    eddD      Z(ee   e	dE<    eddF      Z)ee   e	dG<    eddH      Z*ee+   e	dI<    eddJ      Z,ee+   e	dK<   y)LCustomerListSchemaTFr@   i  cus_9876543210fedcbatill_xyz789uvw012AliceJohnsonzalice.johnson@example.comz+1987654321zJohnson Enterprises InczEnterprise CustomerENT987654321098zAmerica/Los_Angelesz2024-02-01T09:15:00Zz2024-02-10T16:45:00Z)rA   rC   rE   rG   rI   rK   rL   rM   rN   rO   rP   r<   r9   rU   rV   rj   Nrn   r   rA   ro   r   rC   rp   rE   rq   rP   rr   rU   rs   rV   rt   ru   z!Merchant of this customer accountmerchantr   r   rx   rW   ry   r{   rv   rw   r}   rc   r~   rO   r   rN   r   r   r   r   r   rG   r   r   r   rI   r   rK   r   rL   r   r7   r   rM   r   r   zTotal Invoice Pending Amountupcoming_invoice_amountzTotal Invoice Overdue Amountpast_due_amount)-r   r   r    r   r=   r   rA   r   r/   r#   rC   r"   rE   rP   r$   rU   r   rV   ru   r   r   r   r	   r{   r   rw   r   rc   r   rO   rN   r   r   r   rG   r   rI   rK   rL   r7   rM   r   r   floatr   r%   r&   r'   r   r      s   50%&4&'@!6!!#4144
	L2 d8QRBRRK   %T?]^Ix}^ %`!Ix~  &+=&J"  &+=&J"  &+=&J"  */7*Hh~&  0560OXm,  .39.GXd=)* 
 ,1:,FH'(  7<87Hht123  !&d@\ ]Ix~]#(Cg#hM8C=h$)?%M8D>  2792L(-.  !&d@\ ]J]!&tA^!_K#_$T?Z[Ix}[ ;Z[E8C=[ ;YZE8C=Z"'B`"aL(3-a).tIe)f#f+0K_+`hx(`/420Xe_  (-TGe'fOXe_fr&   r   c                   D    e Zd ZU  ed      Z edd      Zee   e	d<   y)CustomerUserSchemaTr2   Nz/The user resource associated with this merchantr   user)
r   r   r    r   r=   r   r   r   r   r#   r%   r&   r'   r   r     s)    d3L).E*D(%
& r&   r   N)r   typingr   r   pydanticr   r   "src.apps.users.schemas.user_commonr   src.apps.base.schemas.commonr	   r
   "src.apps.files.schemas.file_commonr   *src.apps.merchants.schemas.merchant_commonr   src.core.utils.enumsr   r   +src.apps.customers.schemas.customer_contactr   r   r)   r1   r?   r   r   r%   r&   r'   <module>r      sv     ! & A B A E B M	UJ 	UO
 O: 4Aa\ AaHZg Zgz r&   