fix: comments con companies app fixed

This commit is contained in:
2025-08-07 09:40:08 +05:00
parent d46506cc32
commit 73aa6a6242
3 changed files with 21 additions and 20 deletions

View File

@@ -35,9 +35,9 @@ from core.apps.contracts.models import ContractModel
UserModel = get_user_model()
######################################################################
# Crud
######################################################################
###################################################################################
# @view-set | ALL - /companies
###################################################################################
@extend_schema(tags=["Company"])
class CompanyCrudViewSet(BaseViewSetMixin, ModelViewSet):
queryset = CompanyModel.objects.all()
@@ -60,9 +60,9 @@ class CompanyCrudViewSet(BaseViewSetMixin, ModelViewSet):
}
######################################################################
# company/<uuid:pk>/contract
######################################################################
###################################################################################
# @api-view | GET - /companies/<uuid:pk>/contracts
###################################################################################
@extend_schema(tags=["Company Contracts"])
class CompanyContractApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
queryset = CompanyModel.objects.all()
@@ -101,9 +101,9 @@ class CompanyContractApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
return Response(serializer.data, status=status.HTTP_200_OK)
######################################################################
# company/<uuid:pk>/accounts
######################################################################
###################################################################################
# @api-view | GET - /company/<uuid:pk>/accounts
###################################################################################
@extend_schema(tags=["Company Accounts"])
class CompanyAccountApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
queryset = CompanyModel.objects.all()
@@ -128,9 +128,10 @@ class CompanyAccountApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
return Response(data=ser.data, status=status.HTTP_200_OK)
######################################################################
# company/<uuid:pk>/folders
######################################################################
###################################################################################
# @api-view | GET, POST - /company/<uuid:pk>/folders
###################################################################################
@extend_schema(tags=["Company Folders"])
class CompanyFolderApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
queryset = CompanyModel.objects.all()
@@ -142,7 +143,7 @@ class CompanyFolderApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
}
method_permission_classes = {
"get": [IsCompanyAccount],
"get": [IsCompanyAccount],
"post": [IsCompanyAccount],
}
@extend_schema(