XH_Digital_Management/application/hrm_mgnt/serializers.py

17 lines
438 B
Python
Raw Permalink Normal View History

from rest_framework import serializers
from .models import *
class SalaryChangeRecordSerializer(serializers.ModelSerializer):
class Meta:
model = SalaryChangeRecord
fields = '__all__'
class EmployeeInformationSerializer(serializers.ModelSerializer):
salary_change_records = SalaryChangeRecordSerializer(many=True, read_only=True)
class Meta:
model = EmployeeInformation
fields = '__all__'