mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 08:29:17 +02:00
FollowRequest model
This commit is contained in:
parent
3ad1fe17d5
commit
b833a11fb6
2 changed files with 46 additions and 0 deletions
|
@ -103,3 +103,21 @@ class Follow(models.Model):
|
|||
|
||||
def get_federation_url(self):
|
||||
return '{}#follows/{}'.format(self.actor.url, self.uuid)
|
||||
|
||||
|
||||
class FollowRequest(models.Model):
|
||||
uuid = models.UUIDField(default=uuid.uuid4, unique=True)
|
||||
actor = models.ForeignKey(
|
||||
Actor,
|
||||
related_name='emmited_follow_requests',
|
||||
on_delete=models.CASCADE,
|
||||
)
|
||||
target = models.ForeignKey(
|
||||
Actor,
|
||||
related_name='received_follow_requests',
|
||||
on_delete=models.CASCADE,
|
||||
)
|
||||
creation_date = models.DateTimeField(default=timezone.now)
|
||||
last_modification_date = models.DateTimeField(
|
||||
default=timezone.now)
|
||||
approved = models.NullBooleanField(default=None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue