22 lines
725 B
Python
22 lines
725 B
Python
from django.db import models
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from api.core.models.trackable_model import TrackableModel
|
|
|
|
|
|
class Authorization(TrackableModel):
|
|
"""
|
|
Model representing authorizations within the user account system.
|
|
These authorizations can be assigned to roles to control access permissions.
|
|
"""
|
|
|
|
name = models.CharField(verbose_name=_("nom"), max_length=100, unique=True)
|
|
code = models.CharField(verbose_name=_("code"), max_length=100, unique=True)
|
|
description = models.TextField(
|
|
verbose_name=_("description"), blank=True, default=""
|
|
)
|
|
|
|
class Meta:
|
|
verbose_name = _("Authorization")
|
|
verbose_name_plural = _("Authorizations")
|