from django.utils import timezone

from django.db import models

from fwd_api.constant.common import EntityStatus


class UserProfile(models.Model):
    id = models.AutoField(primary_key=True)
    full_name: str = models.CharField(max_length=200)
    sync_id: str = models.CharField(max_length=100)
    provider_id: str = models.CharField(max_length=100, default='Ctel')  # CTel/GCP/Azure :v
    current_total_pages: int = models.IntegerField(default=0)
    limit_total_pages: int = models.IntegerField(default=0)
    status = models.IntegerField(default=EntityStatus.INACTIVE.value)  # 0 INACTIVE 1 ACTIVE
    created_at = models.DateTimeField(default=timezone.now)
    updated_at = models.DateTimeField(auto_now=True)
    email = models.CharField(max_length=200, null=True)
