from django.db import models
from django.conf import settings

# Create your models here.
class RegisteredUser(models.Model):
  created_at = models.DateTimeField(auto_now_add=True)
  updated_at = models.DateTimeField(auto_now=True)
  first_name = models.CharField(max_length=100)
  last_name = models.CharField(max_length=100, blank=True, null=True)
  image = models.TextField(blank=True, null=True)
  nick_name = models.CharField(max_length=100, blank=True, null=True)
  has_nsfw_toggle = models.BooleanField(default=False)

  user = models.ForeignKey(
    settings.AUTH_USER_MODEL,
    on_delete=models.CASCADE
  )

  def __str__(self):
    return self.first_name + " " + self.last_name + " : " + self.user.email