You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
3 days ago
|
from rest_framework import serializers
|
||
|
from .models import Product, Employee, Position, StorageLocation, Contractor, SupplyContract, Truck
|
||
|
|
||
|
class ProductSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Product
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class PositionSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Position
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class EmployeeSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Employee
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class StorageLocationSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = StorageLocation
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class ContractorSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Contractor
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class SupplyContractSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = SupplyContract
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class TruckSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Truck
|
||
|
fields = '__all__'
|