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


class UserProfile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)

    user_description = models.CharField(max_length=200, null=True)
    user_avatar = models.ImageField(null=True, blank=True)
    user_uploaded_recipes = models.IntegerField()  # Increment by 1 on upload

    def __str__(self):
        return f"{self.user.username}"

[(6, 'django.db.models.OneToOneField', 'models.OneToOneField', False, 'from django.db import models\n'), (8, 'django.db.models.CharField', 'models.CharField', False, 'from django.db import models\n'), (9, 'django.db.models.ImageField', 'models.ImageField', False, 'from django.db import models\n'), (10, 'django.db.models.IntegerField', 'models.IntegerField', False, 'from django.db import models\n')]