from django.db import models
from Models.Empresa import Empresa

class Contacto(models.Model):
    id = models.AutoField(primary_key=True)
    nombre = models.CharField(max_length=100)
    email = models.CharField(max_length=100, null=True, blank=True)
    telefono = models.CharField(max_length=30)
    cargo = models.CharField(max_length=100, null=True, blank=True)
    empresa = models.ForeignKey(Empresa, on_delete=models.CASCADE, db_column='empresa_id')
    fecha_creacion = models.DateTimeField()
    deleted_at = models.DateTimeField(null=True, blank=True)  # <-- nuevo campo

    class Meta:
        db_table = 'contacto'
        managed = False

    def __str__(self):
        return self.nombre
