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

User = get_user_model()


class Follow(models.Model):
    user = models.ForeignKey(User,on_delete=models.CASCADE,related_name='follower')
    author = models.ForeignKey(User,on_delete=models.CASCADE,related_name='following')

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


