from django.contrib.auth.models import AbstractUser
from django.db import models

# Create your models here.

class User(AbstractUser):
    
    """ Custom User Model """
    GENDER_MALE = "male"
    GENDER_FEMALE = "female"
    GENDER_OTHER = "other"
    
    GENDER_CHOICES = (
        (GENDER_MALE,"Male"),
        (GENDER_FEMALE,"Female"),
        (GENDER_OTHER,"Other")
    )
    LANGUAGE_ENGLISH = "eng"
    LANGUAGE_KOREAN = "kor"
    
    LANGUAGE_CHOICES=(
      (LANGUAGE_ENGLISH, "English"),
      (LANGUAGE_KOREAN, "Korean")  
    )
    CURRENCY_USD = "usd"
    CURRENCY_KRW = "krw"
    
    CURRENCY_CHOICES = (
        (CURRENCY_USD ,"USD"),
        (CURRENCY_KRW ,"KRW")
    )
    
    avatar = models.ImageField(upload_to="avatars",blank=True)
    gender = models.CharField(choices=GENDER_CHOICES,max_length=10,blank=True)  #charfield 한줄필드
    bio = models.TextField(blank=True) #textfield 필드제한없음
    birthdate = models.DateField(blank=True,null=True)
    language = models.CharField(choices=LANGUAGE_CHOICES,max_length=3,blank=True)
    currency = models.CharField(choices=CURRENCY_CHOICES,max_length=3,blank=True)
    superhost = models.BooleanField(default=False)
    
    #def __str__(self):
     #   return self.username