from django.db import models
# from api.property_api.property.models.property import Property
from common.models.base import TimeStampedModel
from api.property_api.agent.models.agent import Agent

class AgentContactInformation(TimeStampedModel):
    agent_info = models.ForeignKey(
        Agent,
        on_delete=models.CASCADE,
        related_name='agent_contact_information'
    )
    first_name = models.CharField(max_length=100)    
    last_name = models.CharField(max_length=100)
    contact = models.CharField(max_length=15)
    message = models.TextField()
    email = models.EmailField()
    district = models.CharField(max_length=50)    

    class Meta:
        ordering = ['first_name']
        verbose_name_plural = "Agent_ContactsInfo"
    
    def __str__(self):
        return self.first_name