1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02: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:
Yohann D'ANELLO
2020-03-30 00:42:32 +02:00
parent 691a03ecad
commit fb5796d35e
10 changed files with 279 additions and 158 deletions

View File

@ -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.