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, 11, 6, 63), 'django.db.models.OneToOneField', 'models.OneToOneField', (), '', False, 'from django.db import models\n'), ((8, 23, 8, 66), 'django.db.models.CharField', 'models.CharField', (), '', False, 'from django.db import models\n'), ((9, 18, 9, 58), 'django.db.models.ImageField', 'models.ImageField', (), '', False, 'from django.db import models\n'), ((10, 28, 10, 49), 'django.db.models.IntegerField', 'models.IntegerField', ({}, {}), '()', False, 'from django.db import models\n')]