from sde.models import *
from rest_framework import serializers


class SDEIconSerializer(serializers.ModelSerializer):
    class Meta:
        model = SDEIcon
        # fields = ['id', 'iconFile', 'description']
        fields = "__all__"


class SDECategorySerializer(serializers.ModelSerializer):
    class Meta:
        model = SDECategory
        # fields = ['id', 'icon', 'name', 'published']
        fields = "__all__"


class SDEGroupSerializer(serializers.ModelSerializer):
    class Meta:
        model = SDEGroup
        # fields = ['id', 'category', 'name', 'published', 'useBasePrice', 'fittableNonSingleton', 'anchored', 'anchorable', 'icon']
        fields = "__all__"


class SDEMarektGroupSerializer(serializers.ModelSerializer):
    class Meta:
        model = SDEMarektGroup
        # fields = ['id', 'icon', 'name', 'description', 'hasTypes', 'parent_marketgroup']
        fields = "__all__"


class SDEMetaGroupSerializer(serializers.ModelSerializer):
    class Meta:
        model = SDEMetaGroup
        # fields = ['id', 'icon', 'name', 'iconSuffix']
        fields = "__all__"


class SDETypeMaterialSerializer(serializers.ModelSerializer):
    class Meta:
        model = SDETypeMaterial
        # fields = ['type', 'material', 'quantity']
        # fields = "__all__"
        exclude = ['id', 'type']


class SDETypeSerializer(serializers.ModelSerializer):
    # typematerials = SDETypeMaterialSerializer(many=True, read_only=True)
    class Meta:
        model = SDEType
        # fields = ['id', 'group', 'marketgroup', 'metagroup', 'name', 'description', 'published', 'basePrice', 'icon', 'volume', 'portionSize', 'materials']
        fields = "__all__"

