# Path: tests_app/tests/unit/routers/nested_router_mixin/models.py
# class NestedRouterMixinUserModel(models.Model):
#     name = models.CharField(max_length=10)
#     groups = models.ManyToManyField(
#         'NestedRouterMixinGroupModel', related_name='user_groups')
# 
# class NestedRouterMixinGroupModel(models.Model):
#     name = models.CharField(max_length=10)
#     permissions = models.ManyToManyField(
#         'NestedRouterMixinPermissionModel')
# 
# class NestedRouterMixinPermissionModel(models.Model):
#     name = models.CharField(max_length=10)


from rest_framework.viewsets import ModelViewSet
from .models import (
    NestedRouterMixinUserModel as UserModel,
    NestedRouterMixinGroupModel as GroupModel,
    NestedRouterMixinPermissionModel as PermissionModel,
)



class UserViewSet(ModelViewSet):
    model = UserModel


class GroupViewSet(ModelViewSet):
    model = GroupModel


class PermissionViewSet(ModelViewSet):
    model = PermissionModel


class CustomRegexUserViewSet(ModelViewSet):
    lookup_value_regex = 'a'
    model = UserModel


class CustomRegexGroupViewSet(ModelViewSet):
    lookup_value_regex = 'b'
    model = GroupModel


class CustomRegexPermissionViewSet(ModelViewSet):
    lookup_value_regex = 'c'

# Path: tests_app/tests/unit/routers/nested_router_mixin/models.py
# class NestedRouterMixinUserModel(models.Model):
#     name = models.CharField(max_length=10)
#     groups = models.ManyToManyField(
#         'NestedRouterMixinGroupModel', related_name='user_groups')
# 
# class NestedRouterMixinGroupModel(models.Model):
#     name = models.CharField(max_length=10)
#     permissions = models.ManyToManyField(
#         'NestedRouterMixinPermissionModel')
# 
# class NestedRouterMixinPermissionModel(models.Model):
#     name = models.CharField(max_length=10)


# Path: tests_app/tests/unit/routers/nested_router_mixin/views.py
from rest_framework.viewsets import ModelViewSet
from .models import (
    NestedRouterMixinUserModel as UserModel,
    NestedRouterMixinGroupModel as GroupModel,
    NestedRouterMixinPermissionModel as PermissionModel,
)




class UserViewSet(ModelViewSet):
    model = UserModel


class GroupViewSet(ModelViewSet):
    model = GroupModel


class PermissionViewSet(ModelViewSet):
    model = PermissionModel


class CustomRegexUserViewSet(ModelViewSet):
    lookup_value_regex = 'a'
    model = UserModel


class CustomRegexGroupViewSet(ModelViewSet):
    lookup_value_regex = 'b'
    model = GroupModel


class CustomRegexPermissionViewSet(ModelViewSet):
    lookup_value_regex = 'c'

    model = PermissionModel