mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Guests can't be invited more than 5 times a year and a member can't invite more than 3 people per activity.
This commit is contained in:
		@@ -10,6 +10,8 @@ from django.db import models
 | 
			
		||||
from django.utils.translation import gettext_lazy as _
 | 
			
		||||
from polymorphic.models import PolymorphicModel
 | 
			
		||||
 | 
			
		||||
from member.models import Club
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
Defines each note types
 | 
			
		||||
"""
 | 
			
		||||
@@ -174,6 +176,35 @@ class NoteSpecial(Note):
 | 
			
		||||
        return self.special_type
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class NoteCommon(Note):
 | 
			
		||||
    """
 | 
			
		||||
    A :model:`note.Note` for special accounts, where real money enter or leave the system
 | 
			
		||||
    - bank check
 | 
			
		||||
    - credit card
 | 
			
		||||
    - bank transfer
 | 
			
		||||
    - cash
 | 
			
		||||
    - refund
 | 
			
		||||
    This Type of Note is not associated to a :model:`auth.User` or :model:`member.Club` .
 | 
			
		||||
    """
 | 
			
		||||
    note_name = models.CharField(
 | 
			
		||||
        max_length=255,
 | 
			
		||||
        unique=True,
 | 
			
		||||
    )
 | 
			
		||||
    
 | 
			
		||||
    club = models.ForeignKey(
 | 
			
		||||
        Club,
 | 
			
		||||
        on_delete=models.PROTECT,
 | 
			
		||||
        verbose_name=_("club"),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        verbose_name = _("common note")
 | 
			
		||||
        verbose_name_plural = _("common notes")
 | 
			
		||||
 | 
			
		||||
    def __str__(self):
 | 
			
		||||
        return self.note_name
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Alias(models.Model):
 | 
			
		||||
    """
 | 
			
		||||
    points toward  a :model:`note.NoteUser` or :model;`note.NoteClub` instance.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user