a
    Je8                     @   sZ  d dl m Z  d dlmZ d dlmZ d dlmZmZmZm	Z	 ddl
mZ ddlmZmZmZmZmZ dZd	Zd
ZdZdZdZdZdZeded	ed
ededededediZdddddddddddddZG dd dejZG dd  d ejZG d!d" d"ejZG d#d$ d$ejZG d%d& d&ej Z!G d'd( d(ej Z"G d)d* d*ej Z#G d+d, d,ej Z$d-S ).    )datetime)models)forms)BaseModelFormSetIntegerFieldBaseFormSetmodelformset_factory   )bd)divisions_choicesDhakadistricts_choicesarea_choicesJigatolaZ2MBZ4MBZ6MBZ8MBZ10MBZ15MBZ20MBZ25MBJanauaryFebruaryMarchAprilMayJuneJulyAugust	SeptemberOctoberNovemberDecember)r   r   r   r   r   r   r   r   r   r   r   r   c                   @   s   e Zd ZejddZejddZejdddZejde	e
dZejdd	dZejdd
dZejdeedZejdeedZejdeedZejddZejdeddZdd ZdS )CustomerT)primary_key   
max_length   Z01700000000)r    defaultr    choicesr"   Z555566zsr@username      )r    r$   nullc                 C   s(   t | jd | j d | j d | j S Nz -- )strid	full_nameareaaddressself r0   %/var/www/html/isp_hrms/home/models.py__str__C   s    zCustomer.__str__N)__name__
__module____qualname__r   	AutoFieldr*   	CharFieldr+   Zmobilepackage_choicespackage1packagenidZdial_up_usernamer   r   stater   Zcityr   r   r,   r-   
month_dictZbilled_monthr2   r0   r0   r0   r1   r   0   s   r   c                   @   sz   e Zd ZejddZejdee	 
 dZejdeed dZejdddejdZejdeedZe Zd	d
 ZdS )BillTauto_nowr   r"   r   r   r#   r   r'   blank	on_deletec                 C   s4   t | jd t | j d t | j d t | j S )Nz
 Customer z
 package :z	 amount :)r)   bill_idcustomer_idZ
package_idbill_amountr.   r0   r0   r1   r2   Q   s    zBill.__str__N)r3   r4   r5   r   DateTimeFieldZbill_createdr   intr   now	timestamprE   r7   r=   Z
month_bill
ForeignKeySET_NULLcustomerr8   r9   r:   rG   r2   r0   r0   r0   r1   r>   H   s   r>   c                   @   sV   e Zd Zejdee  dZ	ej
ddZejddZe Ze Zdd ZdS )		InventoryTrA   r   r   r?   c                 C   s0   t | jd | j d t | j d t | j S r(   )r)   
product_id	item_nameamountquantityr.   r0   r0   r1   r2   ]   s    zInventory.__str__N)r3   r4   r5   r   r   rI   r   rJ   rK   rP   r7   rQ   rH   Zitem_updatedrS   rR   r2   r0   r0   r0   r1   rO   V   s   rO   c                   @   sl   e Zd Zejdee  dZ	ej
dddejdZejddZe Zejddd	d
d	dZdd ZdS )SupportCasesTrA   r   rB   r   r      YESNO)rV   rW   r#   c                 C   s,   t | jd t | j d | j d | j S r(   )r)   case_idrF   assigned_staffdescriptionr.   r0   r0   r1   r2   h   s    zSupportCases.__str__N)r3   r4   r5   r   r   rI   r   rJ   rK   rX   rL   rM   rN   r7   rY   	TextFieldrZ   Zresolution_providedr2   r0   r0   r0   r1   rT   a   s   rT   c                   @   s   e Zd ZG dd dZdS )CustomerFormc                   @   s   e Zd ZeZdZdS )zCustomerForm.Meta__all__N)r3   r4   r5   r   modelfieldsr0   r0   r0   r1   Meta   s   r`   Nr3   r4   r5   r`   r0   r0   r0   r1   r\   |   s   r\   c                   @   s   e Zd ZG dd dZdS )BillFormc                   @   s   e Zd ZeZdZdS )zBillForm.Metar]   N)r3   r4   r5   r>   r^   r_   r0   r0   r0   r1   r`      s   r`   Nra   r0   r0   r0   r1   rb      s   rb   c                   @   s   e Zd ZG dd dZdS )InventoryFormc                   @   s   e Zd ZeZdZdS )zInventoryForm.Metar]   N)r3   r4   r5   rO   r^   r_   r0   r0   r0   r1   r`      s   r`   Nra   r0   r0   r0   r1   rc      s   rc   c                   @   s   e Zd ZG dd dZdS )SupportCasesFormc                   @   s   e Zd ZeZdZdS )zSupportCasesForm.Metar]   N)r3   r4   r5   rT   r^   r_   r0   r0   r0   r1   r`      s   r`   Nra   r0   r0   r0   r1   rd      s   rd   N)%r   	django.dbr   djangor   Zdjango.formsr   r   r   r    r
   r   r   r   r   r   r9   Zpackage2Zpackage3Zpackage4Zpackage5Zpackage6Zpackage7Zpackage8r8   r=   Modelr   r>   rO   rT   	ModelFormr\   rb   rc   rd   r0   r0   r0   r1   <module>   sV   