from rest_framework import serializers

from apps.inm.models import WareHouse

from apps.system.serializers import UserSimpleSerializer

class WareHouseSerializer(serializers. ModelSerializer):
    create_by_=UserSimpleSerializer('create_by', read_only=True)
    class Meta:
        model = WareHouse
        fields = '__all__'

class WareHouseCreateUpdateSerializer(serializers.ModelSerializer):
    class Meta:
        model = WareHouse
        fields = ['name', 'number', 'place']