From ed60c71c6d3cfeb435b802c842dfe175a378141c Mon Sep 17 00:00:00 2001 From: Czw996 <459749926@qq.com> Date: Thu, 4 Nov 2021 23:49:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/data/filters.py | 7 +++++++ apps/data/models.py | 7 +++++-- apps/data/permissions.py | 6 ++++++ apps/data/schemas.py | 6 ++++++ apps/data/serializers.py | 7 +++++++ apps/data/urls.py | 5 +++++ apps/data/views.py | 9 +++++++-- apps/finance/filters.py | 7 +++++++ apps/finance/models.py | 7 +++++-- apps/finance/permissions.py | 6 ++++++ apps/finance/schemas.py | 6 ++++++ apps/finance/serializers.py | 7 +++++++ apps/finance/urls.py | 5 +++++ apps/finance/views.py | 9 +++++++-- apps/flow/filters.py | 7 +++++++ apps/flow/models.py | 7 +++++-- apps/flow/permissions.py | 6 ++++++ apps/flow/schemas.py | 6 ++++++ apps/flow/serializers.py | 7 +++++++ apps/flow/urls.py | 5 +++++ apps/flow/views.py | 9 +++++++-- apps/goods/filters.py | 7 +++++++ apps/goods/models.py | 7 +++++-- apps/goods/permissions.py | 6 ++++++ apps/goods/schemas.py | 6 ++++++ apps/goods/serializers.py | 7 +++++++ apps/goods/urls.py | 5 +++++ apps/goods/views.py | 9 +++++++-- apps/option/filters.py | 7 +++++++ apps/option/models.py | 7 +++++-- apps/option/permissions.py | 6 ++++++ apps/option/schemas.py | 6 ++++++ apps/option/serializers.py | 7 +++++++ apps/option/urls.py | 5 +++++ apps/option/views.py | 9 +++++++-- apps/purchase/filters.py | 7 +++++++ apps/purchase/models.py | 7 +++++-- apps/purchase/permissions.py | 6 ++++++ apps/purchase/schemas.py | 6 ++++++ apps/purchase/serializers.py | 7 +++++++ apps/purchase/urls.py | 5 +++++ apps/purchase/views.py | 9 +++++++-- apps/sales/filters.py | 7 +++++++ apps/sales/models.py | 7 +++++-- apps/sales/permissions.py | 6 ++++++ apps/sales/schemas.py | 6 ++++++ apps/sales/serializers.py | 7 +++++++ apps/sales/urls.py | 5 +++++ apps/sales/views.py | 9 +++++++-- apps/statistic/filters.py | 7 +++++++ apps/statistic/models.py | 7 +++++-- apps/statistic/permissions.py | 6 ++++++ apps/statistic/schemas.py | 6 ++++++ apps/statistic/serializers.py | 7 +++++++ apps/statistic/urls.py | 5 +++++ apps/statistic/views.py | 9 +++++++-- apps/stock_check/filters.py | 7 +++++++ apps/stock_check/models.py | 7 +++++-- apps/stock_check/permissions.py | 6 ++++++ apps/stock_check/schemas.py | 6 ++++++ apps/stock_check/serializers.py | 7 +++++++ apps/stock_check/urls.py | 5 +++++ apps/stock_check/views.py | 9 +++++++-- apps/stock_in/filters.py | 7 +++++++ apps/stock_in/models.py | 7 +++++-- apps/stock_in/permissions.py | 6 ++++++ apps/stock_in/schemas.py | 6 ++++++ apps/stock_in/serializers.py | 7 +++++++ apps/stock_in/urls.py | 5 +++++ apps/stock_in/views.py | 9 +++++++-- apps/stock_out/filters.py | 7 +++++++ apps/stock_out/models.py | 7 +++++-- apps/stock_out/permissions.py | 6 ++++++ apps/stock_out/schemas.py | 6 ++++++ apps/stock_out/serializers.py | 7 +++++++ apps/stock_out/urls.py | 5 +++++ apps/stock_out/views.py | 9 +++++++-- apps/stock_transfer/filters.py | 7 +++++++ apps/stock_transfer/models.py | 7 +++++-- apps/stock_transfer/permissions.py | 6 ++++++ apps/stock_transfer/schemas.py | 6 ++++++ apps/stock_transfer/serializers.py | 7 +++++++ apps/stock_transfer/urls.py | 5 +++++ apps/stock_transfer/views.py | 9 +++++++-- apps/system/apps.py | 2 +- apps/system/filters.py | 7 +++++++ apps/system/models.py | 4 ++-- apps/system/permissions.py | 6 ++++++ apps/system/schemas.py | 6 ++++++ apps/system/serializers.py | 7 +++++++ apps/system/urls.py | 5 +++++ apps/system/views.py | 9 +++++++-- extensions/models.py | 4 ++-- project/settings.py | 12 ++++++++++++ project/urls.py | 12 ++++++++++++ trash/templates/filters.py | 7 +++++++ trash/templates/permissions.py | 6 ++++++ trash/templates/schemas.py | 6 ++++++ trash/templates/serializers.py | 7 +++++++ trash/templates/urls.py | 5 +++++ trash/templates/views.py | 8 ++++++++ 101 files changed, 622 insertions(+), 55 deletions(-) create mode 100644 apps/data/filters.py create mode 100644 apps/data/permissions.py create mode 100644 apps/data/schemas.py create mode 100644 apps/data/serializers.py create mode 100644 apps/data/urls.py create mode 100644 apps/finance/filters.py create mode 100644 apps/finance/permissions.py create mode 100644 apps/finance/schemas.py create mode 100644 apps/finance/serializers.py create mode 100644 apps/finance/urls.py create mode 100644 apps/flow/filters.py create mode 100644 apps/flow/permissions.py create mode 100644 apps/flow/schemas.py create mode 100644 apps/flow/serializers.py create mode 100644 apps/flow/urls.py create mode 100644 apps/goods/filters.py create mode 100644 apps/goods/permissions.py create mode 100644 apps/goods/schemas.py create mode 100644 apps/goods/serializers.py create mode 100644 apps/goods/urls.py create mode 100644 apps/option/filters.py create mode 100644 apps/option/permissions.py create mode 100644 apps/option/schemas.py create mode 100644 apps/option/serializers.py create mode 100644 apps/option/urls.py create mode 100644 apps/purchase/filters.py create mode 100644 apps/purchase/permissions.py create mode 100644 apps/purchase/schemas.py create mode 100644 apps/purchase/serializers.py create mode 100644 apps/purchase/urls.py create mode 100644 apps/sales/filters.py create mode 100644 apps/sales/permissions.py create mode 100644 apps/sales/schemas.py create mode 100644 apps/sales/serializers.py create mode 100644 apps/sales/urls.py create mode 100644 apps/statistic/filters.py create mode 100644 apps/statistic/permissions.py create mode 100644 apps/statistic/schemas.py create mode 100644 apps/statistic/serializers.py create mode 100644 apps/statistic/urls.py create mode 100644 apps/stock_check/filters.py create mode 100644 apps/stock_check/permissions.py create mode 100644 apps/stock_check/schemas.py create mode 100644 apps/stock_check/serializers.py create mode 100644 apps/stock_check/urls.py create mode 100644 apps/stock_in/filters.py create mode 100644 apps/stock_in/permissions.py create mode 100644 apps/stock_in/schemas.py create mode 100644 apps/stock_in/serializers.py create mode 100644 apps/stock_in/urls.py create mode 100644 apps/stock_out/filters.py create mode 100644 apps/stock_out/permissions.py create mode 100644 apps/stock_out/schemas.py create mode 100644 apps/stock_out/serializers.py create mode 100644 apps/stock_out/urls.py create mode 100644 apps/stock_transfer/filters.py create mode 100644 apps/stock_transfer/permissions.py create mode 100644 apps/stock_transfer/schemas.py create mode 100644 apps/stock_transfer/serializers.py create mode 100644 apps/stock_transfer/urls.py create mode 100644 apps/system/filters.py create mode 100644 apps/system/permissions.py create mode 100644 apps/system/schemas.py create mode 100644 apps/system/serializers.py create mode 100644 apps/system/urls.py diff --git a/apps/data/filters.py b/apps/data/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/data/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/data/models.py b/apps/data/models.py index 71a8362..2bb459e 100644 --- a/apps/data/models.py +++ b/apps/data/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/data/permissions.py b/apps/data/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/data/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/data/schemas.py b/apps/data/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/data/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/data/serializers.py b/apps/data/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/data/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/data/urls.py b/apps/data/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/data/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/data/views.py b/apps/data/views.py index 91ea44a..02bf587 100644 --- a/apps/data/views.py +++ b/apps/data/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/finance/filters.py b/apps/finance/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/finance/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/finance/models.py b/apps/finance/models.py index 71a8362..2bb459e 100644 --- a/apps/finance/models.py +++ b/apps/finance/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/finance/permissions.py b/apps/finance/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/finance/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/finance/schemas.py b/apps/finance/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/finance/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/finance/serializers.py b/apps/finance/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/finance/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/finance/urls.py b/apps/finance/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/finance/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/finance/views.py b/apps/finance/views.py index 91ea44a..02bf587 100644 --- a/apps/finance/views.py +++ b/apps/finance/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/flow/filters.py b/apps/flow/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/flow/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/flow/models.py b/apps/flow/models.py index 71a8362..2bb459e 100644 --- a/apps/flow/models.py +++ b/apps/flow/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/flow/permissions.py b/apps/flow/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/flow/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/flow/schemas.py b/apps/flow/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/flow/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/flow/serializers.py b/apps/flow/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/flow/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/flow/urls.py b/apps/flow/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/flow/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/flow/views.py b/apps/flow/views.py index 91ea44a..02bf587 100644 --- a/apps/flow/views.py +++ b/apps/flow/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/goods/filters.py b/apps/goods/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/goods/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/goods/models.py b/apps/goods/models.py index 71a8362..2bb459e 100644 --- a/apps/goods/models.py +++ b/apps/goods/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/goods/permissions.py b/apps/goods/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/goods/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/goods/schemas.py b/apps/goods/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/goods/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/goods/serializers.py b/apps/goods/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/goods/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/goods/urls.py b/apps/goods/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/goods/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/goods/views.py b/apps/goods/views.py index 91ea44a..02bf587 100644 --- a/apps/goods/views.py +++ b/apps/goods/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/option/filters.py b/apps/option/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/option/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/option/models.py b/apps/option/models.py index 71a8362..2bb459e 100644 --- a/apps/option/models.py +++ b/apps/option/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/option/permissions.py b/apps/option/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/option/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/option/schemas.py b/apps/option/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/option/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/option/serializers.py b/apps/option/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/option/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/option/urls.py b/apps/option/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/option/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/option/views.py b/apps/option/views.py index 91ea44a..02bf587 100644 --- a/apps/option/views.py +++ b/apps/option/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/purchase/filters.py b/apps/purchase/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/purchase/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/purchase/models.py b/apps/purchase/models.py index 71a8362..2bb459e 100644 --- a/apps/purchase/models.py +++ b/apps/purchase/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/purchase/permissions.py b/apps/purchase/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/purchase/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/purchase/schemas.py b/apps/purchase/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/purchase/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/purchase/serializers.py b/apps/purchase/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/purchase/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/purchase/urls.py b/apps/purchase/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/purchase/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/purchase/views.py b/apps/purchase/views.py index 91ea44a..02bf587 100644 --- a/apps/purchase/views.py +++ b/apps/purchase/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/sales/filters.py b/apps/sales/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/sales/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/sales/models.py b/apps/sales/models.py index 71a8362..2bb459e 100644 --- a/apps/sales/models.py +++ b/apps/sales/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/sales/permissions.py b/apps/sales/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/sales/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/sales/schemas.py b/apps/sales/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/sales/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/sales/serializers.py b/apps/sales/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/sales/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/sales/urls.py b/apps/sales/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/sales/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/sales/views.py b/apps/sales/views.py index 91ea44a..02bf587 100644 --- a/apps/sales/views.py +++ b/apps/sales/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/statistic/filters.py b/apps/statistic/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/statistic/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/statistic/models.py b/apps/statistic/models.py index 71a8362..2bb459e 100644 --- a/apps/statistic/models.py +++ b/apps/statistic/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/statistic/permissions.py b/apps/statistic/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/statistic/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/statistic/schemas.py b/apps/statistic/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/statistic/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/statistic/serializers.py b/apps/statistic/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/statistic/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/statistic/urls.py b/apps/statistic/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/statistic/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/statistic/views.py b/apps/statistic/views.py index 91ea44a..02bf587 100644 --- a/apps/statistic/views.py +++ b/apps/statistic/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/stock_check/filters.py b/apps/stock_check/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/stock_check/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/stock_check/models.py b/apps/stock_check/models.py index 71a8362..2bb459e 100644 --- a/apps/stock_check/models.py +++ b/apps/stock_check/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/stock_check/permissions.py b/apps/stock_check/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/stock_check/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/stock_check/schemas.py b/apps/stock_check/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/stock_check/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/stock_check/serializers.py b/apps/stock_check/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/stock_check/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/stock_check/urls.py b/apps/stock_check/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/stock_check/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/stock_check/views.py b/apps/stock_check/views.py index 91ea44a..02bf587 100644 --- a/apps/stock_check/views.py +++ b/apps/stock_check/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/stock_in/filters.py b/apps/stock_in/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/stock_in/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/stock_in/models.py b/apps/stock_in/models.py index 71a8362..2bb459e 100644 --- a/apps/stock_in/models.py +++ b/apps/stock_in/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/stock_in/permissions.py b/apps/stock_in/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/stock_in/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/stock_in/schemas.py b/apps/stock_in/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/stock_in/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/stock_in/serializers.py b/apps/stock_in/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/stock_in/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/stock_in/urls.py b/apps/stock_in/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/stock_in/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/stock_in/views.py b/apps/stock_in/views.py index 91ea44a..02bf587 100644 --- a/apps/stock_in/views.py +++ b/apps/stock_in/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/stock_out/filters.py b/apps/stock_out/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/stock_out/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/stock_out/models.py b/apps/stock_out/models.py index 71a8362..2bb459e 100644 --- a/apps/stock_out/models.py +++ b/apps/stock_out/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/stock_out/permissions.py b/apps/stock_out/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/stock_out/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/stock_out/schemas.py b/apps/stock_out/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/stock_out/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/stock_out/serializers.py b/apps/stock_out/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/stock_out/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/stock_out/urls.py b/apps/stock_out/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/stock_out/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/stock_out/views.py b/apps/stock_out/views.py index 91ea44a..02bf587 100644 --- a/apps/stock_out/views.py +++ b/apps/stock_out/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/stock_transfer/filters.py b/apps/stock_transfer/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/stock_transfer/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/stock_transfer/models.py b/apps/stock_transfer/models.py index 71a8362..2bb459e 100644 --- a/apps/stock_transfer/models.py +++ b/apps/stock_transfer/models.py @@ -1,3 +1,6 @@ -from django.db import models +from extensions.models import * -# Create your models here. + +__all__ = [ + +] diff --git a/apps/stock_transfer/permissions.py b/apps/stock_transfer/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/stock_transfer/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/stock_transfer/schemas.py b/apps/stock_transfer/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/stock_transfer/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/stock_transfer/serializers.py b/apps/stock_transfer/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/stock_transfer/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/stock_transfer/urls.py b/apps/stock_transfer/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/stock_transfer/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/stock_transfer/views.py b/apps/stock_transfer/views.py index 91ea44a..02bf587 100644 --- a/apps/stock_transfer/views.py +++ b/apps/stock_transfer/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/apps/system/apps.py b/apps/system/apps.py index a2d131d..b6e1e55 100644 --- a/apps/system/apps.py +++ b/apps/system/apps.py @@ -3,4 +3,4 @@ from django.apps import AppConfig class SystemConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' - name = 'system' + name = 'apps.system' diff --git a/apps/system/filters.py b/apps/system/filters.py new file mode 100644 index 0000000..a505264 --- /dev/null +++ b/apps/system/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/apps/system/models.py b/apps/system/models.py index 9574633..18b3718 100644 --- a/apps/system/models.py +++ b/apps/system/models.py @@ -23,7 +23,7 @@ class Permission(Model): code = CharField(max_length=64, verbose_name='权限代码') -class Role(BaseModel): +class Role(Model, ModelMixin): """角色""" name = CharField(max_length=64, verbose_name='名称') @@ -35,7 +35,7 @@ class Role(BaseModel): unique_together = [('name', 'team')] -class User(BaseModel): +class User(Model, ModelMixin): """用户""" username = CharField(max_length=32, verbose_name='用户名') diff --git a/apps/system/permissions.py b/apps/system/permissions.py new file mode 100644 index 0000000..b4f0898 --- /dev/null +++ b/apps/system/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/apps/system/schemas.py b/apps/system/schemas.py new file mode 100644 index 0000000..8d7cdfd --- /dev/null +++ b/apps/system/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/apps/system/serializers.py b/apps/system/serializers.py new file mode 100644 index 0000000..e56ad7f --- /dev/null +++ b/apps/system/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/apps/system/urls.py b/apps/system/urls.py new file mode 100644 index 0000000..60018cb --- /dev/null +++ b/apps/system/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/apps/system/views.py b/apps/system/views.py index 91ea44a..02bf587 100644 --- a/apps/system/views.py +++ b/apps/system/views.py @@ -1,3 +1,8 @@ -from django.shortcuts import render +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * -# Create your views here. + +__all__ = [ + +] diff --git a/extensions/models.py b/extensions/models.py index e76be10..176843a 100644 --- a/extensions/models.py +++ b/extensions/models.py @@ -8,7 +8,7 @@ from django.db.models.functions import Coalesce from django.db import transaction, connection -class BaseModel(Model): +class ModelMixin(): def validate(self): """验证""" @@ -23,7 +23,7 @@ class AmountField(DecimalField): __all__ = [ - 'Model', 'BaseModel', 'IntegerChoices', 'TextChoices', + 'Model', 'ModelMixin', 'IntegerChoices', 'TextChoices', 'CASCADE', 'SET_NULL', 'SET_DEFAULT', 'PROTECT', 'OneToOneField', 'ForeignKey', 'ManyToManyField', 'BooleanField', 'IntegerField', 'FloatField', 'DecimalField', 'AmountField', diff --git a/project/settings.py b/project/settings.py index e117dbb..25fc7d2 100644 --- a/project/settings.py +++ b/project/settings.py @@ -46,6 +46,18 @@ INSTALLED_APPS = [ 'debug_toolbar', 'apps.system', + 'apps.data', + 'apps.goods', + 'apps.purchase', + 'apps.sales', + 'apps.stock_in', + 'apps.stock_out', + 'apps.stock_check', + 'apps.stock_transfer', + 'apps.flow', + 'apps.finance', + 'apps.statistic', + 'apps.option', ] MIDDLEWARE = [ diff --git a/project/urls.py b/project/urls.py index 5e55647..f6a728e 100644 --- a/project/urls.py +++ b/project/urls.py @@ -32,4 +32,16 @@ urlpatterns = [ *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT), path('api/', include('apps.system.urls')), + path('api/', include('apps.data.urls')), + path('api/', include('apps.goods.urls')), + path('api/', include('apps.purchase.urls')), + path('api/', include('apps.sales.urls')), + path('api/', include('apps.stock_in.urls')), + path('api/', include('apps.stock_out.urls')), + path('api/', include('apps.stock_check.urls')), + path('api/', include('apps.stock_transfer.urls')), + path('api/', include('apps.flow.urls')), + path('api/', include('apps.finance.urls')), + path('api/', include('apps.statistic.urls')), + path('api/', include('apps.option.urls')), ] diff --git a/trash/templates/filters.py b/trash/templates/filters.py index e69de29..a505264 100644 --- a/trash/templates/filters.py +++ b/trash/templates/filters.py @@ -0,0 +1,7 @@ +from django_filters.rest_framework import FilterSet +from django_filters.filters import * + + +__all__ = [ + +] diff --git a/trash/templates/permissions.py b/trash/templates/permissions.py index e69de29..b4f0898 100644 --- a/trash/templates/permissions.py +++ b/trash/templates/permissions.py @@ -0,0 +1,6 @@ +from extensions.permissions import InterfacePermission + + +__all__ = [ + +] diff --git a/trash/templates/schemas.py b/trash/templates/schemas.py index e69de29..8d7cdfd 100644 --- a/trash/templates/schemas.py +++ b/trash/templates/schemas.py @@ -0,0 +1,6 @@ +from extensions.serializers import * + + +__all__ = [ + +] diff --git a/trash/templates/serializers.py b/trash/templates/serializers.py index e69de29..e56ad7f 100644 --- a/trash/templates/serializers.py +++ b/trash/templates/serializers.py @@ -0,0 +1,7 @@ +from extensions.serializers import * +from extensions.exceptions import * + + +__all__ = [ + +] diff --git a/trash/templates/urls.py b/trash/templates/urls.py index e69de29..60018cb 100644 --- a/trash/templates/urls.py +++ b/trash/templates/urls.py @@ -0,0 +1,5 @@ +from extensions.routers import * + + +router = BaseRouter() +urlpatterns = router.urls diff --git a/trash/templates/views.py b/trash/templates/views.py index e69de29..02bf587 100644 --- a/trash/templates/views.py +++ b/trash/templates/views.py @@ -0,0 +1,8 @@ +from extensions.permissions import * +from extensions.exceptions import * +from extensions.viewsets import * + + +__all__ = [ + +]