mirror of https://gitlab.crans.org/bde/nk20
Added trust model
This commit is contained in:
parent
bd4fb23351
commit
7ab0fec3bc
|
@ -217,6 +217,29 @@ class NoteSpecial(Note):
|
||||||
return self.special_type
|
return self.special_type
|
||||||
|
|
||||||
|
|
||||||
|
class Trust(models.Model):
|
||||||
|
"""
|
||||||
|
A one-sided trust relationship bertween two users
|
||||||
|
|
||||||
|
If another user considers you as your friend, you can transfer money from
|
||||||
|
them
|
||||||
|
"""
|
||||||
|
|
||||||
|
trusting = models.ForeignKey(
|
||||||
|
Note,
|
||||||
|
on_delete=models.CASCADE,
|
||||||
|
related_name='trusting',
|
||||||
|
verbose_name=('trusting')
|
||||||
|
)
|
||||||
|
|
||||||
|
trusted = models.ForeignKey(
|
||||||
|
Note,
|
||||||
|
on_delete=models.CASCADE,
|
||||||
|
related_name='trusted',
|
||||||
|
verbose_name=('trusted')
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Alias(models.Model):
|
class Alias(models.Model):
|
||||||
"""
|
"""
|
||||||
points toward a :model:`note.NoteUser` or :model;`note.NoteClub` instance.
|
points toward a :model:`note.NoteUser` or :model;`note.NoteClub` instance.
|
||||||
|
|
Loading…
Reference in New Issue