<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">from django.db import models
from masters.models.contact_type import ContactType
from hrms.models.user import JRPUser
from django.contrib.auth.models import PermissionsMixin
 
 
 
 



class UserContact (models.Model):
    title = models.CharField(max_length=50, null=False, blank=False )
    contact_number = models.CharField(max_length=200, null=False, blank=False )
    user = models.ForeignKey(JRPUser,null=False,related_name='user_contact',on_delete=models.CASCADE)
    contact_type = models.ForeignKey(ContactType,null=False,related_name='user_contact_type',on_delete=models.CASCADE)
    is_whatsapp_number=models.BooleanField(default=False)
    is_whatsapp_approved=models.BooleanField(default=False)
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
    created_by = models.ForeignKey(JRPUser, null=True, blank=True,
                                   related_name='usercontact_created_by', on_delete=models.SET_NULL)
    updated_by = models.ForeignKey(JRPUser, null=True, blank=True,
                                   related_name='usercontact_updated_by', on_delete=models.SET_NULL)
    
    

    def __str__(self):
        return self.title

    class Meta:
        verbose_name_plural = "addresses"</pre></body></html>