# Path: authentication/models.py
# class UserType(models.Model):
#     id = models.CharField(max_length=25, primary_key=True)
#     name = models.CharField(max_length=50)
#     validation = models.CharField(max_length=255)
# 
#     def check_user(self, user: 'User') -> bool:
#         """
#         Check if the user has the current type
#         """
#         if not isinstance(user, User):
#             raise ValueError("Provided user must be an instance of authentication.User")
#         if settings.STAGE != "test" and not getattr(user, 'fetched_data', None):
#             raise ValueError("User full data must be fetched first")
#         try:
#             return eval(self.validation, {}, { 'user': user })
#         except Exception as error:
#             raise UserTypeValidationError.from_usertype(self) from error
# 
#     def __str__(self) -> str:
#         return self.name
# 
#     class Meta:
#         verbose_name = "User Type"
#         ordering = ('id',)
# 
# Path: sales/models.py
# class Field(models.Model):
#     """
#     Defines an Item's specification
#     """
#     id      = models.CharField(max_length=32, primary_key=True)
#     name    = models.CharField(max_length=NAME_FIELD_MAXLEN)  # TODO label
#     type    = models.CharField(max_length=32)
#     default = models.CharField(max_length=254, blank=True, null=True)
#     items   = models.ManyToManyField(Item,
#                                      through='ItemField',
#                                      through_fields=('field', 'item'))
# 
#     def __str__(self) -> str:
#         return f"{self.name} ({self.type})"
# 
#     class Meta:
#         ordering = ('id',)


from typing import List
from django.core.management.base import BaseCommand, CommandError
from authentication.models import UserType
from sales.models import Field
            'id': 'tremplin',
            'name': 'Tremplin UTC',
            'validation': 'user',
        },
        {
            'id': 'exterieur',
            'name': 'Extérieur',
            'validation': 'True',
        },
    ],
    'field': [
        {
            'id': "first_name",
            'name': "Prénom",
            'type': "string",
            'default': "owner.first_name",
        },
        {
            'id': "last_name",
            'name': "Nom",
            'type': "string",
            'default': "owner.last_name",
        },
        {
            'id': "sex",
            'name': "Sexe",
            'type': "choices",
            'default': "H,F",
        },
        {

# Path: authentication/models.py
# class UserType(models.Model):
#     id = models.CharField(max_length=25, primary_key=True)
#     name = models.CharField(max_length=50)
#     validation = models.CharField(max_length=255)
# 
#     def check_user(self, user: 'User') -> bool:
#         """
#         Check if the user has the current type
#         """
#         if not isinstance(user, User):
#             raise ValueError("Provided user must be an instance of authentication.User")
#         if settings.STAGE != "test" and not getattr(user, 'fetched_data', None):
#             raise ValueError("User full data must be fetched first")
#         try:
#             return eval(self.validation, {}, { 'user': user })
#         except Exception as error:
#             raise UserTypeValidationError.from_usertype(self) from error
# 
#     def __str__(self) -> str:
#         return self.name
# 
#     class Meta:
#         verbose_name = "User Type"
#         ordering = ('id',)
# 
# Path: sales/models.py
# class Field(models.Model):
#     """
#     Defines an Item's specification
#     """
#     id      = models.CharField(max_length=32, primary_key=True)
#     name    = models.CharField(max_length=NAME_FIELD_MAXLEN)  # TODO label
#     type    = models.CharField(max_length=32)
#     default = models.CharField(max_length=254, blank=True, null=True)
#     items   = models.ManyToManyField(Item,
#                                      through='ItemField',
#                                      through_fields=('field', 'item'))
# 
#     def __str__(self) -> str:
#         return f"{self.name} ({self.type})"
# 
#     class Meta:
#         ordering = ('id',)


# Path: core/management/commands/init_defaults.py
from typing import List
from django.core.management.base import BaseCommand, CommandError
from authentication.models import UserType
from sales.models import Field

            'id': 'tremplin',
            'name': 'Tremplin UTC',
            'validation': 'user',
        },
        {
            'id': 'exterieur',
            'name': 'Extérieur',
            'validation': 'True',
        },
    ],
    'field': [
        {
            'id': "first_name",
            'name': "Prénom",
            'type': "string",
            'default': "owner.first_name",
        },
        {
            'id': "last_name",
            'name': "Nom",
            'type': "string",
            'default': "owner.last_name",
        },
        {
            'id': "sex",
            'name': "Sexe",
            'type': "choices",
            'default': "H,F",
        },
        {

            'id': "birthdate",