mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 17:12:28 +01:00 
			
		
		
		
	Added trust model
This commit is contained in:
		@@ -217,6 +217,29 @@ class NoteSpecial(Note):
 | 
			
		||||
        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):
 | 
			
		||||
    """
 | 
			
		||||
    points toward  a :model:`note.NoteUser` or :model;`note.NoteClub` instance.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user