from rest_framework.serializers import ModelSerializer, ValidationError from erp_system.models import PermissionsModel # 权限基本的序列化类 class PermissionsSerializer(ModelSerializer): class Meta: model = PermissionsModel fields = '__all__'