Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db import models
- from django.conf import settings
- from apps.ubicacion.models import Ciudad
- from .models import *
- class Cliente(models.Model):
- estado = models.BooleanField(default=True)
- nombre_o_razon = models.CharField(max_length=50)
- apellido = models.CharField(max_length=50, null=True , blank=True)
- direccion = models.CharField(max_length=50, null=True,blank=True)
- tipo_identificacion = models.ForeignKey(TipoIdentificacion,on_delete=models.SET_NULL, null=True)
- identificacion = models.CharField(max_length=50)
- telefono = models.CharField(max_length=20)
- email = models.EmailField()
- nombre_contacto = models.CharField(max_length=50, null=True,blank=True)
- ciudad = models.ForeignKey(Ciudad, on_delete=models.SET_NULL, null=True)
- tipo_sociedad = models.ForeignKey(TipoSociedad, on_delete=models.SET_NULL,null=True, blank=True)
- tipo_organizacion = models.ForeignKey(TipoOrganizacion, on_delete=models.SET_NULL,null=True)
- regimenfiscal = models.ForeignKey(RegimenFiscal, on_delete=models.SET_NULL,null=True, blank=True)
- usuario = models.ManyToManyField(settings.AUTH_USER_MODEL, null=True, blank=True)
- logo = models.ImageField(upload_to = 'imagen-cliente/', null=False)
- fecha_creacion = models.DateTimeField(auto_now_add=True)
- fecha_actualizacion = models.DateTimeField(auto_now=True)
- def __str__(self):
- return self.nombre_o_razon
- class Meta():
- verbose_name_plural = "Clientes"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement