o
    i                     @   s@   d dl mZ d dlmZ G dd dejZG dd dejZdS )    )models)OportunidadDeVentac                   @   s   e Zd ZejddZejdddddZejddZej	dddZ
ejdd	d
ZejddZejddZejdddZG dd dZdd ZdS )ProductoTprimary_keyd   )
max_lengthnullblankunique   )r   r	   r
         )
max_digitsdecimal_placesauto_now_addauto_nowc                   @   s   e Zd ZdZdZdS )zProducto.MetaproductoTN)__name__
__module____qualname__db_tablemanaged r   r   ,/var/www/html/crm_dreinet/producto/models.pyMeta   s    r   c                 C   s   | j S )N)nombreselfr   r   r   __str__   s   zProducto.__str__N)r   r   r   r   	AutoFieldid	CharFieldcodigor   	TextFielddescripcionDecimalFieldvalorDateTimeField
created_at
updated_at
deleted_atr   r"   r   r   r   r   r      s    r   c                   @   s   e Zd ZejddZejeejdddZ	eje
ejdddZejdd	Zejd
dddZejddZejddZejdddZG dd dZdd ZdS )OportunidadProductoTr   oportunidad_id	productos)	on_delete	db_columnrelated_nameproducto_idoportunidades   )defaultr   r   zPrecio al momento de la venta)r   r   	help_textr   r   r   c                   @   s&   e Zd ZdZdZejddgdgZdS )zOportunidadProducto.Metaoportunidad_productoToportunidadr   )fieldsN)r   r   r   r   r   r   Indexindexesr   r   r   r   r   "   s
    r   c                 C   s   | j  d| j S )Nz - )r;   r   r    r   r   r   r"   )   s   zOportunidadProducto.__str__N)r   r   r   r   r#   r$   
ForeignKeyr   CASCADEr;   r   r   IntegerFieldcantidadr)   precio_unitarior+   r,   r-   r.   r   r"   r   r   r   r   r/      s    r/   N)	django.dbr   !Models.oportunidad_de_venta_modelr   Modelr   r/   r   r   r   r   <module>   s    