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


class UserProfile(models.Model):
    user=models.OneToOneField(User ,on_delete=models.CASCADE)
    address=models.CharField(max_length=50)
    age=models.IntegerField()
    GENDER_MALE = 0
    GENDER_FEMALE = 1
    GENDER_CHOICES = [(GENDER_MALE, 'Male'), (GENDER_FEMALE, 'Female')]
    gender = models.IntegerField(choices=GENDER_CHOICES,default=GENDER_MALE)

    def __str__(self):
        return self.user.username