from django.db import models

# Create your models here.
from authentication.models import BaseModel, SystemUserProfile


class User_Bale(BaseModel):
    rasadyar_user = models.ForeignKey(SystemUserProfile, on_delete=models.CASCADE,
                                      related_name="rasadyar_user",
                                      null=True)
    chat_id = models.BigIntegerField(unique=True)
    first_name = models.CharField(max_length=100, null=True, blank=True)
    last_name = models.CharField(max_length=100, null=True, blank=True)
    phone_number = models.CharField(max_length=20, null=True, blank=True)
    created_at = models.DateTimeField(auto_now_add=True)
    super_admin = models.BooleanField(default=False)

    def save(self, *args, **kwargs):
        super(User_Bale, self).save(*args, **kwargs)
