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}"

[((119, 171), 'django.db.models.OneToOneField', 'models.OneToOneField', (['User'], {'on_delete': 'models.CASCADE'}), '(User, on_delete=models.CASCADE)\n', (139, 171), False, 'from django.db import models\n'), ((196, 239), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'null': '(True)'}), '(max_length=200, null=True)\n', (212, 239), False, 'from django.db import models\n'), ((258, 298), 'django.db.models.ImageField', 'models.ImageField', ([], {'null': '(True)', 'blank': '(True)'}), '(null=True, blank=True)\n', (275, 298), False, 'from django.db import models\n'), ((327, 348), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (346, 348), False, 'from django.db import models\n')]