from django.db import models
from Accounts.models import UserProfile
# Create your models here.
class Devices(models.Model):
    identifier_name =  models.CharField(max_length=50)
    device_name = models.CharField(max_length=50)
    operating_system = models.CharField(max_length= 50)
    department = models.CharField(max_length=50)
    used_by = models.ForeignKey(UserProfile, on_delete=models.DO_NOTHING)
    zone  = models.CharField(max_length=50)
    continents = models.CharField(max_length=50)
    region = models.CharField(max_length=50)
    cluster = models.CharField(max_length=50)
    pod = models.CharField(max_length=500,blank=True, null=True)
    device_unique_id = models.CharField(max_length=50, blank=True, null=True)
    mac_address = models.CharField(max_length=17,null=True) 
    unique_id = models.CharField(max_length=16,null=True) 
    timezone = models.CharField(max_length=50, blank=True, null=True)
    created_at = models.DateTimeField(auto_now=True)
    updated_at = models.DateTimeField(auto_now=True)
    
    def __str__(self):
        return self.identifier_name
    
    